Compare commits

...

4 Commits

Author SHA1 Message Date
Stanislas aa3c635821
Merge 4013bd3dd6 into d1e6332644 2024-11-21 00:59:13 +01:00
Simon Eskildsen d1e6332644
Merge pull request #1444 from BobConanDev/patch-1
Update README.md, fix a typo
2024-11-18 09:38:25 -05:00
Bob Conan a05a55da82
Update README.md, fix a typo 2024-10-22 14:02:08 -05:00
Stanislas Lange 4013bd3dd6
README: fix indentation in snippet 2020-08-10 13:37:49 +02:00
1 changed files with 5 additions and 5 deletions

View File

@ -75,10 +75,10 @@ time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x20822
To ensure this behaviour even if a TTY is attached, set your formatter as follows: To ensure this behaviour even if a TTY is attached, set your formatter as follows:
```go ```go
log.SetFormatter(&log.TextFormatter{ log.SetFormatter(&log.TextFormatter{
DisableColors: true, DisableColors: true,
FullTimestamp: true, FullTimestamp: true,
}) })
``` ```
#### Logging Method Name #### Logging Method Name
@ -384,7 +384,7 @@ Third party logging formatters:
* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout. * [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the Power of Zalgo. * [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the Power of Zalgo.
* [`nested-logrus-formatter`](https://github.com/antonfisher/nested-logrus-formatter). Converts logrus fields to a nested structure. * [`nested-logrus-formatter`](https://github.com/antonfisher/nested-logrus-formatter). Converts logrus fields to a nested structure.
* [`powerful-logrus-formatter`](https://github.com/zput/zxcTool). get fileName, log's line number and the latest function's name when print log; Sava log to files. * [`powerful-logrus-formatter`](https://github.com/zput/zxcTool). get fileName, log's line number and the latest function's name when print log; Save log to files.
* [`caption-json-formatter`](https://github.com/nolleh/caption_json_formatter). logrus's message json formatter with human-readable caption added. * [`caption-json-formatter`](https://github.com/nolleh/caption_json_formatter). logrus's message json formatter with human-readable caption added.
You can define your formatter by implementing the `Formatter` interface, You can define your formatter by implementing the `Formatter` interface,