Commit Graph

1166 Commits

Author SHA1 Message Date
Andrey Tcherepanov 5d8c3bffc9 Updated travis.yml 2019-03-27 10:59:38 -06:00
Andrey Tcherepanov 41ee4dd365 Moved moved unix-related parts into terminal 2019-03-27 10:56:55 -06:00
Andrey Tcherepanov 7de3dd8c8b Removed golang.org/x/crypto refs 2019-03-27 10:56:55 -06:00
Andrey Tcherepanov 10ff0d07c3 Got rid of IsTerminal call to reduce external dependencies 2019-03-27 10:56:55 -06:00
David Bariod 1115b87d62
Merge pull request #927 from ceh-forks/ci-go-1-12
Test with Go 1.12
2019-03-27 09:37:13 +01:00
Emil Hessman c076594430 Add Go 1.12 to Travis CI build matrix 2019-03-27 07:08:19 +01:00
tbunyk c88f8de1fe Add Bytes() method to Entry, and use it to avoid double type cast 2019-03-18 16:07:31 +02:00
tbunyk 470f2e08fc Fix some test conditions 2019-03-15 13:19:10 +02:00
tbunyk d8e3add56f Add hook to send logs to custom writer #678 2019-03-15 13:09:11 +02:00
Kirill Motkov 1487633cc3 Rewrite if-else-if-else to switch statements 2019-03-13 12:38:09 +03:00
Adam Renberg Tamm dae0fa8d5b
Merge pull request #920 from sirupsen/changelog-v140
Add CHANGELOG for v1.4.0
2019-03-11 17:20:41 +01:00
Adam Renberg Tamm 02141df9f0 Add CHANGELOG for v1.4.0 2019-03-11 16:27:44 +01:00
David Bariod 5bd5a315a5
Merge pull request #919 from tgwizard/entry-context
Add WithContext
2019-03-11 15:47:26 +01:00
Adam Renberg Tamm 68e41f673a Add WithContext 2019-03-11 15:38:19 +01:00
Sébastien Lavoie 131eba2470
Merge pull request #901 from CodeLingoBot/rewrite
Fix error formatting based on best practices from Code Review Comments
2019-03-11 10:33:21 -04:00
David Bariod d7b6bf5e4d
Merge pull request #916 from sirupsen/fix_race_getcaller
Fix race getcaller
2019-03-06 14:14:08 +01:00
David Bariod cf1b9fd15e fix sync.Once usage instead of adding a mutex lock 2019-03-06 14:08:02 +01:00
georlav b9d451406d fix ReportCaller race condition 2019-03-04 20:58:21 +02:00
David Bariod c9b4f5af6d
Merge pull request #913 from sirupsen/example_caller_prettyfier
Example caller prettyfier
2019-03-03 12:00:21 +01:00
David Bariod 99a5172d62 Add and example for CallerPrettyfier 2019-03-03 11:53:51 +01:00
David Bariod 5c2b39a4f8 Remove debug trace 2019-03-03 11:52:04 +01:00
David Bariod fa3c1df513
Merge pull request #911 from sirupsen/caller_prettyfier_text_formatter
Add a CallerPrettyfier callback to the text formatter
2019-02-27 13:42:49 +01:00
David Bariod ffec2f2e0a Add a CallerPrettyfier callback to the text formatter 2019-02-27 13:35:45 +01:00
David Bariod cbce296565
Merge pull request #909 from sirupsen/caller_prettyfier
Add a CallerPrettyfier callback to the json formatter
2019-02-27 13:13:02 +01:00
David Bariod 5e9b246bea Add a CallerPrettyfier callback to the json formatter 2019-02-27 13:02:20 +01:00
noushavandijk 4f5fd631f1 Fix infinite recursion on unknown Level.String()
Using `%q` in the error string causes `MarshalText` to recurse (by calling String()).
2019-02-20 09:22:53 -08:00
David Bariod cdb2f3857c
Merge pull request #897 from antonfisher/patch-1
Add nested-logrus-formatter to README.md
2019-02-10 14:00:17 +01:00
David Bariod 1261c1f8a1
Merge pull request #903 from gavincabbage/entry-logf-level
prevent string formatting in Entry.Logf when log level is not enabled
2019-02-10 13:38:47 +01:00
Gavin Cabbage c4e4882020 prevent string formatting in Entry.Logf when log level is not enabled 2019-02-06 14:51:33 -05:00
CodeLingo Bot 774bb8e43f Fix error formatting based on best practices from Code Review Comments
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-05 05:52:27 +00:00
Georgi Dimitrov 4ea4861398 Add a DeferExitHandler function
Useful for running exit handlers in the same order as defer statements
2019-01-29 10:29:38 -08:00
Anton Fisher 68a2b575f1
Add nested-logrus-formatter to README.md
Hi,
I'd like to propose another one third-party formatter for logrus (https://github.com/antonfisher/nested-logrus-formatter).
Thanks.
2019-01-26 14:16:28 -08:00
Richard Poirier 7d8d63893b
Merge pull request #893 from jiangxin/jx/fix-warningln
logger: fix wrong callback method
2019-01-22 11:28:20 -08:00
Jiang Xin f61e48bb8e logger: fix wrong callback method
Fix wrong callback in `logger.go`, and add test cases:

1. `logger.Warningln` should call `logger.Warnln`, not `logger.Warn`.

2. It's ok for `logger.Print` to call `entry.Info`, but calling `entry.Print`
   is better.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
2019-01-22 20:46:10 +08:00
David Bariod 659e47340e
Merge pull request #890 from sirupsen/hook_fire_order_test
Add a unit test to ensure hook are called in their registration order
2019-01-17 13:59:11 +01:00
David Bariod 0f544bf278 Add a unit test to ensure hook are called in their registration order 2019-01-17 13:42:39 +01:00
David Bariod 11dad09cee
Merge pull request #889 from sirupsen/default_field_hook
Add an example hook which adds default fields
2019-01-17 09:42:32 +01:00
David Bariod a99ca4776d Add an example hook which adds default fields 2019-01-17 09:37:03 +01:00
Sergey Romanov 78fb3852d9 Remove unused variables in TextFormatter 2019-01-11 11:22:21 -08:00
Rich Poirier eef6b768ab Update Changelog for 1.3.0 2019-01-04 17:46:35 -08:00
Richard Poirier e1e72e9de9
Merge pull request #863 from lugray/generic_log
Add Generic Log functions with level via argument
2019-01-02 14:40:11 -08:00
Lisa Ugray bd9534b799 Test Log 2019-01-02 14:59:36 -05:00
Lisa Ugray e8fd0ba609 Remove sensitivity to file line changes 2019-01-02 14:58:51 -05:00
David Bariod 6180652bb0
Merge pull request #878 from sirupsen/json_level_marshalling
Implement TextUnmarshaller interface for Level type
2018-12-26 17:51:57 +01:00
David Bariod ff695daa36 Implement TextUnmarshaller interface for Level type
Since the implementation of the TextMarshaller interface
we could not unmarshal previously json marshalled Level value.
Fixes #873
2018-12-26 17:43:14 +01:00
Lisa Ugray a6668e7a60 Add Generic Log functions with level via argument 2018-12-20 15:49:25 -05:00
David Bariod 2067ea4241
Merge pull request #874 from sirupsen/fieldErrorBugFix
do not clear error formatting informative field
2018-12-15 16:21:19 +01:00
David Bariod 9abefb94aa do not clear error formatting informative field 2018-12-14 17:01:34 +01:00
David Bariod 9f049671f1
Merge pull request #864 from ceriath/patch-1
Remove colored output on windows
2018-12-10 09:02:29 +01:00
Ceriath d962013756 respect ForceColor and environment variables over OS check 2018-12-09 21:47:44 +01:00