2023-05-04 18:16:41 +00:00
|
|
|
package logger
|
|
|
|
|
2023-07-11 18:08:00 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2023-05-04 18:16:41 +00:00
|
|
|
// Destination is a log destination.
|
|
|
|
type Destination int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// DestinationStdout writes logs to the standard output.
|
|
|
|
DestinationStdout Destination = iota
|
|
|
|
|
|
|
|
// DestinationFile writes logs to a file.
|
|
|
|
DestinationFile
|
|
|
|
|
|
|
|
// DestinationSyslog writes logs to the system logger.
|
|
|
|
DestinationSyslog
|
|
|
|
)
|
|
|
|
|
|
|
|
type destination interface {
|
2023-07-11 18:08:00 +00:00
|
|
|
log(time.Time, Level, string, ...interface{})
|
2023-05-04 18:16:41 +00:00
|
|
|
close()
|
|
|
|
}
|