Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ func (l *Logger) Close() {
}
}

// SetFlags sets the output flags for the logger.
func (l *Logger) SetFlags(flag int) {
l.infoLog.SetFlags(flag)
l.warningLog.SetFlags(flag)
l.errorLog.SetFlags(flag)
l.fatalLog.SetFlags(flag)
}

// Info logs with the Info severity.
// Arguments are handled in the manner of fmt.Print.
func (l *Logger) Info(v ...interface{}) {
Expand Down Expand Up @@ -351,7 +359,7 @@ func Errorf(format string, v ...interface{}) {
defaultLogger.output(sError, 0, fmt.Sprintf(format, v...))
}

// Fatalln uses the default logger, logs with the Fatal severity,
// Fatal uses the default logger, logs with the Fatal severity,
// and ends with os.Exit(1).
// Arguments are handled in the manner of fmt.Print.
func Fatal(v ...interface{}) {
Expand Down