Commit Graph

1156 Commits

Author SHA1 Message Date
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
Simon Brisson 52b92f5b89 Allows overriding Entry.Time. 2018-07-03 11:38:02 -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
David Bariod dd2931c82a
Merge pull request #771 from codepainters/master
Support for Entry data under nested JSON dictionary.
2018-07-01 18:24:02 +02:00
David Bariod 56faed7e3d
Merge pull request #743 from dgsb/master
Improve documentation for Fatal* class functions
2018-07-01 18:02:41 +02:00
David Bariod e3292c4c4d
Merge pull request #677 from neilisaac/text-field-map
Add FieldMap support to TextFormatter
2018-06-25 07:25:43 +02:00
Christian Stewart eed1c0f832 Fix GopherJS build tags
The GopherJS build tag is "js" not "gopherjs"

Signed-off-by: Christian Stewart <christian@paral.in>
2018-06-20 21:39:23 -07:00
Przemyslaw Wegrzyn 2ce6c0cb44 Support for Entry data under nested JSON dictionary. 2018-06-19 14:31:57 +02:00
Neil Isaac 6b28c2c7d7 error message 2018-06-18 21:39:53 -04:00
Neil Isaac 5d60369ef3 Fixed prefixFieldClashes for TextFormatter and added coverage 2018-06-18 21:32:35 -04:00
Neil Isaac 21326f6618 Merge remote-tracking branch 'origin/master' into text-field-map 2018-06-18 21:08:59 -04:00
David Bariod 75068beb13
Merge pull request #756 from matejb/patch-1
Fix Logger.WithField description
2018-06-18 13:14:19 +02: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
Moriyoshi Koizumi 070c81def3 Revert the change introduced in #707 and do the proper fix. Fixes #729 2018-05-30 09:50:59 +00:00
Simon Eskildsen ea8897e799
Merge pull request #758 from dgsb/hook_wiki
Move the hook services list to a wiki page
2018-05-23 03:42:43 -04:00
David Bariod 098a5a7cd7 Move the hook services list to a wiki page 2018-05-19 21:26:32 +02:00
Matej Baćo caed59ec68
Fix Logger.WithField doscription
I was puzzled by function documentation not mentioning it works with Error level, so I had to check it out by creating example before I add logrus as a dependency on the company project. Example confirmed what logic was telling me that Logger.WithFields works with Error level of logs.
This is is a fix of this small documentation oversight.
2018-05-17 11:02:39 +02:00
taylorchu aa6766adfe PERF: use buffer pool in json formatter
benchmark             old ns/op     new ns/op     delta
BenchmarkLogrus-8     4163          4369          +4.95%

benchmark             old allocs     new allocs     delta
BenchmarkLogrus-8     36             31             -13.89%

benchmark             old bytes     new bytes     delta
BenchmarkLogrus-8     3027          2163          -28.54%
2018-05-15 16:46:37 -07:00
Simon Eskildsen 0dad3b6953
Merge pull request #752 from dgsb/bug/751
Fix a race condition in TestLoggingWithHooksRace
2018-05-15 11:40:58 -04:00
Simon Eskildsen bde08903c7
Merge pull request #744 from dbs5/master
added Anexia CloudLog to list of hooks
2018-05-15 00:41:40 -04:00
Simon Eskildsen 7971176ef8
Merge pull request #748 from LyricTian/master
add mysql hook
2018-05-15 00:41:24 -04:00
Simon Eskildsen 620a8739dc
Merge pull request #754 from dgsb/bug/753
Update go versions in travis configuration.
2018-05-15 00:41:04 -04:00
David Bariod b1e82bef65 Update go versions in travis configuration.
We only keep the latest 3 language release.
Fixes #753
2018-05-13 10:29:45 +02:00
David Bariod 8369e2f077 Fix a race condition in TestLoggingWithHooksRace 2018-05-12 15:52:19 +02:00
lyric 507c822874 add mysql hook 2018-04-27 17:53:47 +08:00
dbs5 e63a8df340 added Anexia CloudLog to list of hooks 2018-04-16 20:20:18 +02:00
David Bariod 5513c60034 Improve documentation for Fatal* class functions 2018-04-16 14:16:44 +02:00
Felix Kollmann 2f58bc83cb Unified terminal initialization code handling 2018-04-03 04:55:52 +02:00
Felix Kollmann 9bc59a5969 Fixed initTerminal() was run for non-terminals 2018-04-03 04:50:50 +02:00
Felix Kollmann cf5eba7dfd Simplified file structure 2018-04-03 04:47:29 +02:00
Felix Kollmann c9a46a1e7c Added terminal check on Windows 2018-04-03 04:40:58 +02:00
Felix Kollmann 7d2a5214bf Extended conditions to include non-native builds 2018-04-03 01:23:44 +02:00
Felix Kollmann f142d8145b Improved building of non-windows code 2018-04-03 01:15:45 +02:00
Felix Kollmann bb487e068c Added support for text coloring on Windows 10 2018-04-03 00:25:30 +02:00
Stephen Day 778f2e774c
Merge pull request #407 from roganartu/master
Added option to disable level text truncation in default text formatter
2018-03-29 15:59:52 -07:00
Stephen Day a0285bf3ac
Merge pull request #709 from silverlyra/dynamic-clash
Have prefixFieldClashes respect the JSON FieldMap
2018-03-29 14:32:20 -07:00
Stephen Day 6ecf50095b
Merge pull request #713 from earlzo/hotfix/wrong-comment
Fixed: wrong comment for NewEntry
2018-03-29 14:30:34 -07:00
Stephen Day 7406e22f35
Merge pull request #726 from wla80/master
Fix run-on sentence
2018-03-29 14:30:08 -07:00
Stephen Day 41f384185c
Merge pull request #739 from hondrus/patch-2
delete dead link
2018-03-29 14:22:02 -07:00
Olzhas Ilyubayev 19b9c9e1ff
delete dead link
https://github.com/ripcurld00d/logrus-logzio-hook isn't available now
2018-03-28 12:10:14 +06:00
Wilson b537da569f Fix run-on sentence 2018-03-22 14:05:31 -07:00
Marianne Feng 723dd3cd1f changed prettyprinting to use spaces as opposed to /t 2018-03-20 18:20:51 -07:00
Marianne Feng 509bff05a7 Merge branch 'master' of github.com:sirupsen/logrus 2018-03-20 18:18:22 -07:00
Stephen Day 90150a8ed1
Merge pull request #711 from oxgrouby/master
reamde: add logrus-clickhouse-hook
2018-03-14 18:07:03 -07:00
Simon Eskildsen c155da1940 changelog: add 1.0.5 2018-03-11 18:51:37 -04:00
Dave Clendenan c74e39f432
Merge branch 'master' into master 2018-03-08 15:53:25 -08:00
Stephen Day f4ee691250
Merge pull request #722 from dylanmei/add-kafka-rest-proxy-hook
Add Kafka REST Proxy hook to README
2018-02-28 14:01:33 -08:00
Stephen Day 796df9f552
Merge pull request #717 from gracenoah/gopherjs
add gopherjs build tag
2018-02-28 13:44:18 -08:00
Dylan Meissner 91b159d34d Add Kafka REST Proxy hook to README 2018-02-27 16:51:24 -08:00