1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-04-17 11:06:32 +02:00

21 lines
536 B
Go
Raw Normal View History

2017-03-05 18:56:08 +11:00
package pipeline
import (
backend "github.com/woodpecker-ci/woodpecker/pipeline/backend/types"
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
2017-03-05 18:56:08 +11:00
)
// Logger handles the process logging.
type Logger interface {
Log(*backend.Step, multipart.Reader) error
}
// LogFunc type is an adapter to allow the use of an ordinary
// function for process logging.
type LogFunc func(*backend.Step, multipart.Reader) error
// Log calls f(proc, r).
func (f LogFunc) Log(step *backend.Step, r multipart.Reader) error {
return f(step, r)
}