Commit Graph

11 Commits

Author SHA1 Message Date
Dave Clendenan 5840194571 Merge branch 'master' of https://github.com/Sirupsen/logrus
Conflicts:
	alt_exit_test.go
	json_formatter_test.go
2016-12-02 09:38:12 -08:00
Dave Clendenan 65f3af38f7 simplify hasCaller check 2016-11-30 15:15:38 -08:00
Dave Clendenan a5c845c224 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.
2016-11-30 14:07:10 -08:00
Dave Clendenan 348bace269 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.
2016-11-29 09:35:34 -08:00
Dave Clendenan 93af604ba7 First cut at adding calling method
If log.SetReportMethod(true) then method=PACKAGE.FUNCTION will be added
as a field to log lines.
eg: time="2016-11-25T19:04:43-08:00" level=info method=main msg="log
testing"

TODO: documentation, examples
2016-11-25 19:02:56 -08:00
Andrew Burian c92f90003f Switched hardcoded string for const value 2016-11-21 10:16:24 -08:00
Andrew Burian 1d329ad042 Added option to disable JSON timestamp
Tests verify both the default and disabled case.
2016-11-21 10:09:59 -08:00
Ryan Canty d5ca23f998
Added FieldMap to reduce potential struct bloat 2016-11-17 15:16:46 -08:00
Ryan Canty 2173899f8f Added customizable keys to JSON formatter 2016-11-16 21:56:00 -08:00
Simon Eskildsen ab83faccde json_formatter: add tests for field clashes and newline 2015-03-09 15:30:43 +00:00
Simon Eskildsen 8287db7934 json_formatter: always cast errors to strings
Fixes #137
2015-03-09 15:15:08 +00:00