WARNING is a waste of my time

How many log levels do you know? How many log levels are actually useful? At Relax and Recover we had an interesting discussion about the use of the WARNING log level.

I suddenly realized that in a world of automation, I need only two log levels:

ERROR and everthing else.

ERROR means that I as a human should take action. Everything else is irrelevant for me.

So far for the user side. As a programmer the choice of log level is sometimes much more difficult. As a programmer I might not want to decide for the user if some problem is an ERROR or not. The obvious solution is to issue a WARNING in an attempt to shed the responsibility of making a decision.

But in an automated world that does not help me as an admin to run the software better. WARNINGS for most cases only create extra manual work because somebody needs to go and check some log file and decide if there actually is a problem. I would rather have the software make that decision and I would be happy to fix or readjust the software if that decision was wrong. So, please no WARNINGs.

Apparently others see that different and prefer to get a large amount of WARNINGs. The only way out is that software should be written so that the user can configure the behaviour of WARNINGs. If neccessary, it should be even possible to configure the behaviour for different events.

So why are there so many logging levels? I think that the main reason is that it is simpler and less work for software developers to use many log levels than to implement a sophisticated configuration scheme for which events should be considered an ERROR and which not.

Together with a Zero-Bug-Policy, eliminating WARNINGs goes a long way towards beeing more productive.

DevOpsDays 2015 Presentation:

Comments

Like this content? You could send me something from my Amazon Wishlist. Need commercial support? Contact me for Consulting Services.

Popular posts from this blog

Overriding / Patching Linux System Serial Number

A Login Security Architecture Without Passwords

The Demise of KaiOS - Alcatel 3088X