mirror of
https://github.com/ossf/scorecard.git
synced 2024-08-15 03:10:33 +03:00
Split NewLogger into two so we can use a custom logrus instance.
This commit is contained in:
parent
91202855fd
commit
b00b31646a
@ -38,11 +38,16 @@ func NewLogger(logLevel Level) *Logger {
|
||||
logrusLevel := parseLogrusLevel(logLevel)
|
||||
logrusLog.SetLevel(logrusLevel)
|
||||
|
||||
return NewLogrusLogger(logrusLog)
|
||||
}
|
||||
|
||||
// NewLogrusLogger creates an instance of *Logger backed by the supplied
|
||||
// logrusLog instance.
|
||||
func NewLogrusLogger(logrusLog *logrus.Logger) *Logger {
|
||||
logrLogger := logrusr.New(logrusLog)
|
||||
logger := &Logger{
|
||||
&logrLogger,
|
||||
}
|
||||
|
||||
return logger
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user