doc updates, and relabel ReportMethod

in the Logrus context it's the caller, so use that internally.  Label
stays as 'method' since in the context of the log event that seems more
correct.
This commit is contained in:
Dave Clendenan
2016-11-29 09:35:34 -08:00
parent 1e21450408
commit 348bace269
9 changed files with 37 additions and 39 deletions
+6 -8
View File
@@ -27,20 +27,18 @@ func SetFormatter(formatter Formatter) {
std.Formatter = formatter
}
// SetReportMethod sets whether to include calling method and line as
// fields
func SetReportMethod(include bool) {
// SetReportCaller sets whether to include the calling method as a field
func SetReportCaller(include bool) {
std.mu.Lock()
defer std.mu.Unlock()
std.ReportMethod = include
std.ReportCaller = include
}
// ReportMethod sets whether to include calling method and line as
// fields
func ReportMethod() bool {
// ReportCaller returns the 'include calling method' state
func ReportCaller() bool {
std.mu.Lock()
defer std.mu.Unlock()
return std.ReportMethod
return std.ReportCaller
}
// SetLevel sets the standard logger level.