sirupsen / logrus

Structured, pluggable logging for Go.
MIT License
24.59k stars 2.27k forks source link

【help】 logrus.SetOutput(os.Stdout) 、 logrus.SetOutput(to file) ,The format is different #1373

Closed wankaixinga closed 1 year ago

wankaixinga commented 1 year ago

I have no other settings how to make [file] same [as os.Stdout] example:

os.Stdout: DEBU[2023-02-23 18:33:54]main.go(212) main.main: hello

file: time="2023-02-23 18:34:00" level=debug msg=hello func="main.main:" file="main.go(212)"

i want to make file style same as os.Stdout, What should I do?