mirror of
https://github.com/go-acme/lego.git
synced 2024-12-23 01:07:23 +02:00
Use interface for logger. (#639)
This commit is contained in:
parent
83e2300e01
commit
039f5cf785
@ -6,7 +6,17 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Logger is an optional custom logger.
|
// Logger is an optional custom logger.
|
||||||
var Logger = log.New(os.Stdout, "", log.LstdFlags)
|
var Logger StdLogger = log.New(os.Stdout, "", log.LstdFlags)
|
||||||
|
|
||||||
|
// StdLogger interface for Standard Logger.
|
||||||
|
type StdLogger interface {
|
||||||
|
Fatal(args ...interface{})
|
||||||
|
Fatalln(args ...interface{})
|
||||||
|
Fatalf(format string, args ...interface{})
|
||||||
|
Print(args ...interface{})
|
||||||
|
Println(args ...interface{})
|
||||||
|
Printf(format string, args ...interface{})
|
||||||
|
}
|
||||||
|
|
||||||
// Fatal writes a log entry.
|
// Fatal writes a log entry.
|
||||||
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
// It uses Logger if not nil, otherwise it uses the default log.Logger.
|
||||||
|
Loading…
Reference in New Issue
Block a user