Commit Graph

628 Commits

Author SHA1 Message Date
Simon Eskildsen feda23452a readme: link to colorable for windows coloring 2017-02-06 19:51:07 -05:00
Simon Eskildsen b9def5b3c3 readme: even more hooks 2017-02-06 19:44:51 -05:00
Simon Eskildsen 38f1ab3057 changelog: add for 0.11.0 and 0.11.1 2017-02-06 19:40:39 -05:00
Simon Eskildsen e2fcfb2fba readme: add some entries from stale PRs 2017-02-06 19:40:31 -05:00
Simon Eskildsen 03bf27ef26 Merge pull request #471 from sirupsen/terminal-actual-fd
text_formatter: detect tty based on fd
2017-02-06 19:32:13 -05:00
Simon Eskildsen 141e6dc6a6 readme: update with example of logging to file 2017-02-06 19:23:53 -05:00
Simon Eskildsen 11fbf0fa42 text_formatter: fix race 2017-02-06 19:16:49 -05:00
Simon Eskildsen 1726e1744a text_formatter: detect tty based on fd 2017-02-06 19:16:49 -05:00
Stephen Day 61e43dc76f Merge pull request #467 from bengadbois/small_code_cleanup
Small var declaration cleanup
2017-01-12 17:19:11 -08:00
Stephen Day 800b0fc4a6 Merge pull request #465 from at15/fix/miniTS
Remove miniTS in TextFormatter
2017-01-11 13:52:18 -08:00
Ben Gadbois f761cee910 Small var declaration cleanup 2017-01-11 19:19:12 +01:00
at15 5ed3e7dc93
Remove miniTS in TextFormatter
- Related issues: https://github.com/sirupsen/logrus/issues/457
- miniTS use current time instead of time the log function is called,
which is inaccurate when hook takes a long time
- `miniTS` is removed and replaced by
`int(entry.Time.Sub(baseTimestamp)/time.Second)` in `printColored`
which is the only usage of `miniTS`
2017-01-10 21:43:36 -08:00
Stephen Day d4158e8bbd Merge pull request #452 from cjellick/readme-update
Update readme example for switching  output
2017-01-10 12:37:04 -08:00
Simon Eskildsen 2f991e541c Merge pull request #455 from puddingfactory/master
Add Logentrus to README.md (hook for Logentries)
2017-01-10 15:30:36 -05:00
Stephen Day 9b48ece7fc Merge pull request #400 from carolynvs/disable-color-timestamp
Allow disabling timestamps with colored output
2017-01-06 14:16:01 -08:00
puddingfactory cf456d321e Add Logentrus, hook for Logentries, to list 2016-12-10 15:36:15 -06:00
Stephen Day 881bee4e20 Merge pull request #446 from AndrewBurian/json-disable-timestamp
Json disable timestamp
2016-12-01 18:35:07 -08:00
Craig Jellick 7d228b51ce Update readme example for switching output
Clarifies that stderr is the default, not stdout.
2016-12-01 17:37:34 -07:00
Simon Eskildsen 3c3917e625 readme: apologize for casing issue 2016-12-01 18:55:03 -05:00
Simon Eskildsen 26809363aa Revert "Merge pull request #384 from mnzt/master"
This reverts commit 42b84f9ec6, reversing
changes made to cf60a8c5d5.
2016-12-01 18:53:16 -05: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
Stephen Day cf60a8c5d5 Merge pull request #449 from danielgtaylor-isp/patch-1
Fix typo in README
2016-11-30 12:16:55 -08:00
Daniel Taylor 90915c9326 Fix typo in README 2016-11-29 10:52:28 -08:00
Stephen Day e400ff7861 Merge pull request #447 from stevvooe/revert-example-compilation
Compile examples filtered in #439
2016-11-28 14:57:24 -08:00
Stephen J Day 6ecd392994
travis: build Go 1.7 as well, removed by revert
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-11-23 16:20:51 -08:00
Stephen J Day a89950b151 Revert "Updated .travis.yml to ignore /examples/"
This reverts commit 140886f9dc.
2016-11-23 16:19:58 -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
Stephen Day a437dfd246 Merge pull request #396 from onetwopunch/customzable-json-keys
Added customizable keys to JSON formatter
2016-11-18 11:45:39 -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
Simon Eskildsen abc6f20dab Merge pull request #440 from gemnasium/add-pglogrus
Add pglogrus to README
2016-11-11 07:09:51 -05:00
Simon Eskildsen 528e33852c Remove legacy go versions 2016-11-11 07:09:38 -05:00
Simon Eskildsen 1445b7a382 Merge pull request #439 from irfansharif/pre-go1.6-builds
Updated .travis.yml to ignore /examples/
2016-11-08 14:08:11 -05:00
Philippe Lafoucrière 65aed8c493 Add pglogrus to README 2016-11-03 21:59:20 -04:00
Simon Eskildsen d264929707 Merge pull request #419 from aaronlehmann/fix-error-formatting
Fix formatting of wrapped errors when colors are used
2016-11-03 17:40:07 -04:00
irfan sharif 140886f9dc
Updated .travis.yml to ignore /examples/
/examples/hook/hook.go with it's child dependency on airbrake/gobrake is
not backwards compatible pre-go1.6 due to use of the following:
  - os.LookupEnv (introduced in go1.5)
  - http.StatusTooManyRequests (introduced in go1.6)
ignoring the fetch and explicit test of /examples/ fixes failing go1.3,
go1.4, go1.5 builds.
2016-11-03 01:28:25 -04:00
Simon Eskildsen 380f64d344 Merge pull request #412 from sagar8192/add-scribe-hook-description
Add scribe hook
2016-10-31 10:45:02 -04:00
Simon Eskildsen 8de4982a7a Merge pull request #413 from toorop/master
Add Pushover Hook
2016-10-31 10:44:55 -04:00
Simon Eskildsen 7371813290 Merge pull request #421 from heralight/master
Update README.md
2016-10-31 10:44:43 -04:00
Simon Eskildsen 551ec64450 Merge pull request #422 from JJ/master
Adds new logz.io hook by @ripcurld00d
2016-10-31 10:44:29 -04:00
JJ Merelo ea5eab4f4b Adds new logz.io hook by @ripcurld00d 2016-10-09 13:02:24 +02:00
Alexandre Richonnier 0c8a99c9b8 Update README.md
add link to Logrus and Viper integration Helper
2016-10-05 09:20:26 +02:00
Aaron Lehmann f76d643702 Fix formatting of wrapped errors when colors are used
There are two different code paths for rendering a key/value pair. The
non-color version uses a type switch that handles specific types such as
"error", and the color version uses the %+v printf format specifier.
This causes an inconsistency between the two formats. In particular,
errors created using the github.com/pkg/errors package will include a
stack trace of where the error was created when printed to the terminal,
but not to a file. Printing the stack trace as part of the log field is
probably not the right behavior.

The output is also inconsistent between the two forms because strings
are not quoted/escaped when colors are used. This can make log output
unparseable.

Fix this by making both code paths use the type switch and escaping
rules. Fix the escaping code to pass the error value to Fprintf, not the
error itself, which seems to be necessary to avoid blank output with
errors created by github.com/pkg/errors.
2016-09-28 13:48:28 +01:00
Stéphane Depierrepont aka Toorop f7be9f0695 Add Pushover Hook 2016-09-19 16:09:08 +02:00
Sagar Sadashiv Patwardhan 32472f55b6 Add scribe hook 2016-09-18 12:42:16 -07:00
Simon Eskildsen 3ec0642a7f Merge pull request #343 from kaneshin/appengine-support
terminal: Include appengine tag to compile for GAE
2016-08-29 16:23:21 -04:00
Carolyn Van Slyck 98b74aac5b Allow disabling timestamps with colored output 2016-08-24 17:24:54 -05:00