We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I've created this question in stack overflow.
https://stackoverflow.com/questions/48971780/go-change-format-of-log-output-logrus what I need is formatting like [INFO]:2018-02-25 10:42:20 - Starting Process There is a simple way to do it with your lib ?
[INFO]:2018-02-25 10:42:20 - Starting Process
I use go logrus and I need to change the format of the output message, I try several of things without success
what I need is format like this with formatter of logrus
[error]: datetime - message
What I've tried without success is this
logger := &logrus.Logger{ Out: os.Stderr, Level: level, Formatter: &logrus.TextFormatter{ DisableColors: true, TimestampFormat : "2006-01-02 15:04:05", FullTimestamp:true,
}, }
This produce the following
time="2018-02-25 10:42:20" level=error msg="Starting Process"
And I want it to be
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I've created this question in stack overflow.
https://stackoverflow.com/questions/48971780/go-change-format-of-log-output-logrus
what I need is formatting like
[INFO]:2018-02-25 10:42:20 - Starting Process
There is a simple way to do it with your lib ?
I use go logrus and I need to change the format of the output message, I try several of things without success
what I need is format like this with formatter of logrus
[error]: datetime - message
What I've tried without success is this
logger := &logrus.Logger{
Out: os.Stderr,
Level: level,
Formatter: &logrus.TextFormatter{
DisableColors: true,
TimestampFormat : "2006-01-02 15:04:05",
FullTimestamp:true,
This produce the following
time="2018-02-25 10:42:20" level=error msg="Starting Process"
And I want it to be
[INFO]:2018-02-25 10:42:20 - Starting Process
The text was updated successfully, but these errors were encountered: