Re: [Python-ideas] Logging Levels

2017-11-29 Thread Mike Miller
Hi, IMHO the prior decision(s) are too conservative. Reading the bugs, we can see lots of folks reinventing the wheel with common use cases for no good reason. I also gave examples in the log4j, docs, and web apps world that these levels are recognized needs. An addition would represent a

Re: [Python-ideas] Logging Levels

2017-11-29 Thread Mike Miller
Hi, As mentioned, using logging everywhere has some advantages. It doesn't have to be added later on, and it avoided a decent fraction of the work porting to Python 3. Have found users tend to like the labeling of messages, from INFO to ERROR. We skip the time stamp on the console and send

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Nick Coghlan
On 29 November 2017 at 06:46, Mike Miller wrote: > Hi, the reason I use note is that I want it to be output by default. So it > must be above warning, or perhaps the default level changed. If the message to be displayed is part of the actual UX of a command line tool,

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Mike Miller
I think the resistance to trace is that it splits an existing level into two, supporting "level inflation." The current level name of critical is similar, describing not just an error, but a really big error! Note (as described here), handles an additional use case. I don't consider it

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Mike Miller
Hi, the reason I use note is that I want it to be output by default. So it must be above warning, or perhaps the default level changed. (i.e. There is no need for note if it has the same effect as info. We already have info.) -Mike On 2017-11-28 12:31, Guido van Rossum wrote: OK, that's

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Guido van Rossum
On Tue, Nov 28, 2017 at 12:17 PM, Serhiy Storchaka wrote: > 28.11.17 21:45, Guido van Rossum пише: > >> These look like good improvements. I think you should make an issue on >> bugs.python.org describing your proposal and if >> you can submit a PR

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Serhiy Storchaka
28.11.17 21:45, Guido van Rossum пише: These look like good improvements. I think you should make an issue on bugs.python.org describing your proposal and if you can submit a PR that implements it. See https://bugs.python.org/issue31732 It was discussed and rejected.

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Mike Miller
Thanks, will do, after some time for folks to comment further. One question was how will the level integer id affect custom levels defined by applications? If a clash could cause an issue, perhaps adding it above the last one at 100(?) makes more sense. -Mike On 2017-11-28 11:45, Guido

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Mario Corchero
Yep, I personally prefer fatal so I'd be totally in for it. But as you said I can see an issue on the tools that work around the logs produced (typical alerting/monitoring around an app) and all the logs parsing stacks. On 28 November 2017 at 19:59, Guido van Rossum wrote: >

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Guido van Rossum
On Tue, Nov 28, 2017 at 11:52 AM, Mario Corchero wrote: > Not sure if that is what you meant, but here is already "FATAL" which is > indeed an alias of CRITICAL: > > >>> logging.FATAL > 50 > >>> logging.fatal > > Maybe it should just go the other way around, making

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Mike Miller
Yes, I remember now. However, it still outputs with the level name of critical: >>> logging.fatal('hello') CRITICAL:root:hello On 2017-11-28 11:52, Mario Corchero wrote: Not sure if that is what you meant, but here is already "FATAL" which is indeed an alias of CRITICAL: >>>

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Mario Corchero
Not sure if that is what you meant, but here is already "FATAL" which is indeed an alias of CRITICAL: >>> logging.FATAL 50 >>> logging.fatal On 28 November 2017 at 19:45, Guido van Rossum wrote: > These look like good improvements. I think you should make an issue on >

Re: [Python-ideas] Logging Levels

2017-11-28 Thread Guido van Rossum
These look like good improvements. I think you should make an issue on bugs.python.org describing your proposal and if you can submit a PR that implements it. On Tue, Nov 28, 2017 at 11:25 AM, Mike Miller wrote: > Hi, > > I use the logging module extensively for even

[Python-ideas] Logging Levels

2017-11-28 Thread Mike Miller
Hi, I use the logging module extensively for even the simplest scripts, one of the reasons there's been less difficulty moving to Python 3 at work. One of the "nano features" I've often added to its config is the addition of a custom log level. Never mentioned it before because of its