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:
Dave Clendenan
2016-11-30 14:07:10 -08:00
parent 4575b7a64d
commit a5c845c224
7 changed files with 63 additions and 53 deletions
+2 -8
View File
@@ -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()