responses to review comments
- empty string as marker for failure to discover calling function - tighten up logger usage - don't rely on std logger internally Also fix ordering of expected/got in logrus_test.go to ensure correct output form test failures.
This commit is contained in:
+2
-8
@@ -27,20 +27,14 @@ func SetFormatter(formatter Formatter) {
|
||||
std.Formatter = formatter
|
||||
}
|
||||
|
||||
// SetReportCaller sets whether to include the calling method as a field
|
||||
// SetReportCaller sets whether the standard logger will include the calling
|
||||
// method as a field.
|
||||
func SetReportCaller(include bool) {
|
||||
std.mu.Lock()
|
||||
defer std.mu.Unlock()
|
||||
std.ReportCaller = include
|
||||
}
|
||||
|
||||
// ReportCaller returns the 'include calling method' state
|
||||
func ReportCaller() bool {
|
||||
std.mu.Lock()
|
||||
defer std.mu.Unlock()
|
||||
return std.ReportCaller
|
||||
}
|
||||
|
||||
// SetLevel sets the standard logger level.
|
||||
func SetLevel(level Level) {
|
||||
std.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user