qzywyd@163.com
08bbc96fbf
add replace hook method and remove lock method
2021-09-12 16:47:26 +08:00
liwei
ca79890a05
add lock function
2021-08-11 10:48:35 +08:00
Ariel Simulevski
7d248fa1b1
Add loggers that take functions as input
2020-04-10 12:42:19 +02:00
Alex Shi
b70d15e202
Fix typo
2019-12-18 14:10:06 +08:00
Adam Renberg Tamm
68e41f673a
Add WithContext
2019-03-11 15:38:19 +01:00
David Bariod
5fcd19eae6
add a SetReportCaller on Logger object
2018-10-27 15:19:06 +02:00
David Bariod
64d5b7e66c
Merge branch 'master' into caller_feature
2018-10-27 15:10:52 +02:00
Giedrius Dubinskas
c7a33dc5de
Add Trace level logging
2018-10-17 19:12:50 -07:00
drampull
4981d8161c
Added TRACE level logging.
2018-10-17 18:22:00 -07:00
Logan HAUSPIE
90bf2e7f39
feat(LogLevel): taking in account code review from David Bariod
2018-08-27 00:16:06 +02:00
Logan HAUSPIE
0ab534bf6c
Merge remote-tracking branch 'upstream/master'
2018-08-26 23:36:08 +02:00
David Bariod
3ed92f8c1f
Merge branch 'cleanup-exported' of git://github.com/conjmurph/logrus into conjmurph-cleanup-exported
2018-08-26 11:58:08 +02:00
David Bariod
92052687f8
Merge branch 'override-time' of git://github.com/sbrisson2/logrus into sbrisson2-override-time
2018-07-12 22:16:18 +02:00
Simon Brisson
725f3be199
Adds WithTime to Logger and Entry types, as well as a pure module-level function.
2018-07-12 13:25:17 -04:00
David Bariod
e54a77765a
Merge pull request #779 from daskol/iss-241
...
[#241 ] Allow to set writer during logger usage.
2018-07-02 07:55:18 +02:00
Daniel Bershatsky
fc9bbf2f57
[ #241 ] Allow to set writer during logger usage.
2018-07-01 23:57:16 +03:00
Logan HAUSPIE
4225d694ba
feat: new methods to check enabled log level
...
Adding 6 methods on 'exported', 'logger' and 'entry':
- IsDebugEnabled() bool
- IsInfoEnabled() bool
- IsWarnEnabled() bool
- IsErrorEnabled() bool
- IsFatalEnabled() bool
- IsPanicEnabled() bool
Replace duplicated 'if logger.level() >= XxxxLevel' by a call to the new methods in 'logger' and 'entry'
Closes #761
2018-06-06 22:45:35 +02:00
David Bariod
5513c60034
Improve documentation for Fatal* class functions
2018-04-16 14:16:44 +02:00
conor
eb156905d7
remove .gitignore changes and update AddHook
2017-12-21 14:16:49 -05:00
conor
0c03a05a0e
mirror and wrap Logger instance methods in exported.go
2017-12-21 14:04:49 -05:00
Dave Clendenan
eab1019f63
Merge branch 'master' of https://github.com/sirupsen/logrus
2017-08-30 15:39:09 -07:00
Steve Jarvis
20d755ea5e
Export logger's set level function to address #503 .
2017-07-07 16:32:18 -04:00
DmitriyMV
3bcb09397d
This commit fixes data race using atomics. We switch type of level from uint8 to uint32 but due memory alignment on most platforms it will not result in any additional memory.
2017-03-23 19:13:49 +03: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
Joern Barthel
e3e5de11c4
Implement WithError(err) in exported, fixed doco.
2015-05-19 19:50:55 +02:00
Anton Tiurin
f08673d24a
[Race] Fix datarace in GetLevel
...
`std.Level` is protected by mutex in setter (SetLevel),
so it must be protected in geetter (GetLevel) too.
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-02-20 01:14:10 +03:00
Patrick Hemmer
299ee95277
add io.Writer interface compatability
2015-01-12 03:24:19 -05:00
Doug Davis
c64b18f688
add GetLevel support
...
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-12 07:44:54 -05:00
Markus Zimmermann
5573f97efc
fix some typos
2014-10-16 14:43:18 +02:00
Simon Eskildsen
e1154b4315
exported: export to be api compatible
2014-07-26 22:57:45 -04:00
Antoine Grondin
beee753015
Fix missing var args expansion.
2014-07-23 17:46:43 -04:00
Antoine Grondin
e5621dca87
Export package func to a standard logger.
2014-07-21 21:19:55 -04:00