Commit Graph

40 Commits

Author SHA1 Message Date
Lynn Cyrin 58f7e00129
update comments 2019-06-05 00:27:10 -07:00
Lynn Cyrin fa0d2a82ff
add implementation and tests 2019-06-05 00:10:46 -07: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
ceriath f1b98e4006
ignore expected color on windows 2018-11-16 15:19:37 +01:00
Hǎi-Liàng "Hal" Wáng 2cafb78db2 fix race condition caused by writing to entry.Data, using the same technique as JSONFormatter 2018-11-05 12:35:02 +00:00
David Bariod 73bc94e60c Add custom sorting function in text formatter 2018-09-25 13:45:23 +02:00
David Bariod 0908e58e06
Merge pull request #685 from HectorMalot/master
TextFormatter behaviour aligned with stdlib log (fixes #167)
2018-08-26 11:06:30 +02:00
David Bariod b5e6fae4fb Cleanup on unit test on isColored 2018-08-13 17:27:32 +02:00
David Bariod cadf2ceaf8 Add unit test for TextFormatter.isColored 2018-08-09 15:01:49 +02:00
Dennis 8a6a17c003
Fixed missing brace after wrong merge 2018-08-05 22:40:58 +02:00
Dennis f9ef1703ff
Merge branch 'master' into master 2018-08-05 22:34:28 +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
Tony Lee 269eab0f22
Merge branch 'master' into master 2018-01-23 23:04:29 -05:00
Dennis de Reus 92aece568b TextFormatter behaviour aligned with stdlib log (fixes #167)
stdlib `log` adds a newline at the end of a message if none is present,
otherwise does not. Before this change logrus would always add
a newline, resulting in inconsistent behaviour if stdlib log was
replaced with logrus, and a user would e.g. use 'log.printf("test\n")'
2017-12-29 20:26:35 +01:00
Neil Isaac bf1fb70b2b Add FieldMap support to TestFormatter 2017-11-21 22:43:47 -05:00
dmathieu 159e991025 only add a space between text entries if there is already content
So we don't have a trailing space at the end of each log line
2017-07-21 16:14:28 +02:00
dmathieu b264ba77c3 add test in text formatter checking the formatting 2017-07-21 16:06:23 +02:00
dmathieu 2727ac94b0 remove QuoteCharacter option
This seems to be one of the most reported issues, as it makes it a lot
harder to safely escape strings.

This option is very much an edge case, and it's causing too much issues
compared to what it provide.
2017-07-13 13:46:35 +02:00
Paul Seiffert 5f89343f84
Generalize test case 2017-07-12 17:54:01 +02:00
Paul Seiffert b9cfd82645
Quote non-string values if necessary 2017-07-12 17:15:13 +02:00
dmathieu 10e5e38b53 remove ^ from custom quote characters
As of #563, this charater is not quoted anymore.
2017-07-12 14:33:57 +02:00
Damien Mathieu 6f87387fae Merge pull request #563 from meatballhat/unquote-more-chars
Allow more chars in unquoted text formatter output
2017-07-12 13:55:30 +02:00
Paul Seiffert 0383f49850
Use custom quote char and escape it 2017-07-10 14:09:37 +02:00
Dan Buch 5d67428857
Allow more chars in unquoted text formatter output 2017-06-18 09:48:52 -04:00
Ben Brooks e98cd92ccf
Address PR comments 2017-02-15 13:08:26 +00:00
Ben Brooks b545aee819
Add TextFormatter config for custom quote runes 2017-02-14 11:51:23 +00:00
Ben Brooks cfca98e6d9
Add 'QuoteEmptyFields' option to TextFormatter 2017-02-14 10:53:03 +00:00
Tony Lee 31c0a5e6d9 Merge github.com/sirupsen/logrus into github.com/roganartu/logrus 2017-01-24 22:52:54 +11:00
Tony Lee e5b6713580 Added testing for DisableLevelTruncation 2016-09-01 00:28:23 +10:00
Carolyn Van Slyck 98b74aac5b Allow disabling timestamps with colored output 2016-08-24 17:24:54 -05:00
Tiffany Low 3e3e87a165 allow custom time format string in TextFormatter
- fixes examples in README.md that incorrectly state usage of
  RFC3339Nano format instead of RFC3339
2015-03-26 16:15:06 -07:00
Simon Eskildsen 538395b333 text_formatter: add field to disable sorting 2015-03-09 15:19:51 +00:00
Henrik Hodne cd4266df0e text-formatter: do not quote 9 2015-03-04 14:04:50 +00:00
Simon Eskildsen 58f778a886 Revert "Merge pull request #100 from crquan/patch-1"
This reverts commit c6a969a0de, reversing
changes made to 3c5b048a9d.
2015-01-15 13:40:48 -05:00
Derek Che dcbe8d66af make sure no leading or trailing spaces
This changed printColored and printKeyValue to print in same way
with prefix space instead of trailing space, to make it easier
to slice out when returning in Format;
The test cases are to make sure msg formartting doesn't include
leading or trailing spaces;

Closes #99

Signed-off-by: Derek Che <drc@yahoo-inc.com>
2015-01-04 00:19:36 -08:00
Giovanni Bajo 98ee5434ef Make the test more robust 2014-12-18 07:59:41 +01:00
Giovanni Bajo a3ef049df9 Avoid extra quotes where not strictly necessary.
It's not necessary to enclose in quotes every single string value
in log2met format; when using basic words, it's possible to not
quote it (as heroku does for its own logging). This keeps the
logs easier on the human eye.
2014-12-15 20:20:33 +01:00