Skip to content
New issue

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

Add Notice level #121

Closed
smithwinston opened this issue Feb 7, 2015 · 8 comments
Closed

Add Notice level #121

smithwinston opened this issue Feb 7, 2015 · 8 comments

Comments

@smithwinston
Copy link

It would be nice to have an additional level between Info and Warning Notice. I tend to use logging as follows:

  • Notice: System start/stop, significant-but-normal events
  • Info: Detail: User connected, transaction applied etc.
  • Debug: In depth debugging/tracing, e.g. packet dumps

I usually would have the default log level set to Notice and have Errors, Fatal and Panic logged to a remote server for analysis.

@sirupsen
Copy link
Owner

sirupsen commented Feb 7, 2015

This is a pretty narrow use case, and not something that's come up before. It won't be added to Logrus for now. Thanks for the suggestion!

@sirupsen sirupsen closed this as completed Feb 7, 2015
@kellydunn
Copy link

I would also like to see this Log level be introduced into logrus. I too, like to use Notice for errors that aren't as critical and not uncommon to see in a normal workflow. Warning and Error are usually too severe, and Notice is helpful.

@sirupsen
Copy link
Owner

sirupsen commented Dec 5, 2015

@kellydunn it's planned for 1.x that you can add any logging levels you want, as levels will simply become fields, and formatters will support that field or they won't.

@jonhoo
Copy link

jonhoo commented Feb 8, 2016

@sirupsen: is more information about 1.x available somewhere?

@sirupsen
Copy link
Owner

sirupsen commented Feb 9, 2016

@jonhoo not yet, I'm still thinking about it. But it'll be much more customizable, msg, levels etc. won't be special, and center around Go contexts (see the package).

@jonhoo
Copy link

jonhoo commented Feb 9, 2016

@sirupsen sounds great. Being able to have multiple debug levels, and being able to use the logging library sensibly in two different packages that are both used simultaneously, are two of my biggest concerns atm.

@iigorr
Copy link

iigorr commented Mar 23, 2016

+1 for customizable log levels. A generic Log(Level, string) would fit in nicely IMHO.
As for "fixed" levels I have 2 suggestions:

#1:
Info
Verbose
Debug
#2:
Info
Debug
Trace

Personally, I prefer the # 2.

@sleaze
Copy link

sleaze commented Oct 5, 2016

Did this ever happen and land in master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants