forked from mirror/logrus
updated README and added reference
This commit is contained in:
parent
af9d545893
commit
e2a44689a6
|
@ -296,6 +296,7 @@ The built-in logging formatters are:
|
||||||
without colors.
|
without colors.
|
||||||
* *Note:* to force colored output when there is no TTY, set the `ForceColors`
|
* *Note:* to force colored output when there is no TTY, set the `ForceColors`
|
||||||
field to `true`.
|
field to `true`.
|
||||||
|
* *Note:* to force no colored output set the `DisableColors` field to `true`
|
||||||
* `logrus.JSONFormatter`. Logs fields as JSON.
|
* `logrus.JSONFormatter`. Logs fields as JSON.
|
||||||
|
|
||||||
Third party logging formatters:
|
Third party logging formatters:
|
||||||
|
|
|
@ -35,7 +35,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
||||||
|
|
||||||
prefixFieldClashes(entry)
|
prefixFieldClashes(entry)
|
||||||
|
|
||||||
if (f.ForceColors || IsTerminal()) && !DisableColors {
|
if (f.ForceColors || IsTerminal()) && !f.DisableColors {
|
||||||
levelText := strings.ToUpper(entry.Data["level"].(string))[0:4]
|
levelText := strings.ToUpper(entry.Data["level"].(string))[0:4]
|
||||||
|
|
||||||
levelColor := blue
|
levelColor := blue
|
||||||
|
|
Loading…
Reference in New Issue