2017-03-05 07:56:08 +00:00
|
|
|
package pipeline
|
|
|
|
|
|
|
|
import (
|
2021-11-26 02:34:48 +00:00
|
|
|
backend "github.com/woodpecker-ci/woodpecker/pipeline/backend/types"
|
2021-09-24 11:18:34 +00:00
|
|
|
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
|
2017-03-05 07:56:08 +00: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)
|
|
|
|
}
|