Commit Graph

27 Commits

Author SHA1 Message Date
Dave Clendenan eab1019f63 Merge branch 'master' of https://github.com/sirupsen/logrus 2017-08-30 15:39:09 -07:00
dmathieu 325575f181 fix golint issues in formatters 2017-07-26 14:26:30 +02:00
Simon Eskildsen acfabf31db logrus: use lower-case in comments and examples 2017-05-12 15:21:58 -04:00
Mattias Lundell e3715134c9 Fixed small typo in example. 2017-05-05 14:18:10 +02:00
Dave Clendenan 88dd8df1f8 responses to code review
- field rename to be more properly generic
 - drop rewrite of main.main
2016-12-06 12:53:21 -08:00
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 f08011a10f merge upstream, add tests, full method context
- added benchmarks, and assertions for timeliness
- replaced regex usage in package-name handling with a straight
  comparison to a cached value
- log the fullly-qualified method name, to remove ambiguity
    eg: github.com/fflintstone/yabba.dabba.doo
- clean up possibly-unsafe assumptions about using the standard logger,
  remove global lookup function to enforce safe usage
2016-12-01 10:23:00 -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
Simon Eskildsen 42b84f9ec6 Merge pull request #384 from mnzt/master
Renaming upper-case 'Sirupsen' to 'sirupsen'
2016-11-30 15:35:45 -05: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 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 fcf4b8f229
Added comment documentation for FieldMap 2016-11-18 11:02:11 -08:00
Ryan Canty d5ca23f998
Added FieldMap to reduce potential struct bloat 2016-11-17 15:16:46 -08:00
Ryan Canty b2c6f8aa8b Added resolve method to clean up Format 2016-11-17 11:28:41 -08:00
Ryan Canty 2173899f8f Added customizable keys to JSON formatter 2016-11-16 21:56:00 -08:00
Toby a5dbcc756c
Renaming 'Sirupsen' to 'sirupsen' 2016-07-18 16:36:46 +01:00
Simon Eskildsen f1addc2972 formatter/json: fix possible race 2015-05-26 09:02:45 -04:00
Stephen J Day e14471f8f2 Allow configuration of timestamp layout
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-04-06 12:18:40 -07:00
Anton Tiurin 98fd21de2c [JSON] Use type-switch for error field 2015-03-10 19:04:57 +03:00
Simon Eskildsen 8287db7934 json_formatter: always cast errors to strings
Fixes #137
2015-03-09 15:15:08 +00:00
Antoine Grondin 2835e150d9 fixes #88 2014-12-09 21:57:50 -05:00
Antoine Grondin c4cc714937 fix duplication of msg/time/level keys, add benchmarks. 2014-09-16 20:19:42 -04:00
Simon Eskildsen 2c0db7c868 formatter: drop internalFormatter 2014-07-26 22:22:39 -04:00
Simon Eskildsen 40069a98d6 entry: break out time, level and message from data 2014-07-26 21:34:29 -04:00
Simon Eskildsen 53371e3664 Add features from README 2014-03-10 19:22:08 -04:00