Edward Muller
6cd8d684fd
some minimal documentation for Logger.Writer{,Level}
...
This also includes two examples extracted from the readme.
2019-09-05 19:34:46 -07:00
drampull
4981d8161c
Added TRACE level logging.
2018-10-17 18:22:00 -07:00
David Glasser
1fccefa2f4
Add Writer and WriterLevel to Entry
...
This lets you do things like:
cmd := exec.Command("command")
stdout := logrus.WithField("fd", "stdout").Writer()
defer stdout.Close()
stderr := logrus.WithField("fd", "stderr").Writer()
defer stderr.Close()
cmd.Stdout = stdout
cmd.Stderr = stderr
2017-03-06 16:24:57 -08:00
Antoine Grondin
218981bef4
use constant InfoLevel instead of 255
2016-04-16 12:46:11 +05:30
Damien Radtke
1d1fd2d9ce
Add WriterLevel() function to the logger
...
This commit adds a variant of the logger's Writer() function that
accepts a log level. When the variant is used, any messages written to
the returned pipe will be written with the provided level. The original
Writer() function uses the logger's Print() method as it always has.
2016-04-16 12:45:27 +05:30
Anton Tiurin
a8b793a1fc
gofmt
2015-03-10 19:06:14 +03:00
Patrick Hemmer
51cbf81dde
rename InputWriter -> Writer
2015-01-26 09:59:50 -05:00