Logrus: How to use Fileds in logfile

Created on 1 Sep 2016  路  3Comments  路  Source: sirupsen/logrus

For example, log.Fileds{"test": "test"}.Info("xxx") can output something I want.
But I want to see it ini log file, not terminate.
How can I do that?

All 3 comments

io.stdout->file

@AnotherGoogleFan Have you tried setting Logger.Out to a file?

Typically, most people tend to set logging to stderr, since that is a standard.

https://github.com/sirupsen/logrus/pull/471 adds a readme entry to log to a file

Was this page helpful?
0 / 5 - 0 ratings