Top
Best
New

Posted by todsacerdoti 12/17/2025

Log level 'error' should mean that something needs to be fixed(utcc.utoronto.ca)
482 points | 299 commentspage 4
knallfrosch 12/21/2025|
> If a SMTP mailer trying to send email to somewhere logs 'cannot contact port 25 on <remote host>', that is not an error in the local system and should not be logged at level 'error'.

A mail program not being to checks notes send emails sounds like an error to me. (Unless you implement retries.)

Insanity 12/21/2025||
Coincidentally was reviewing code yesterday that had a confusing/contradictory statement..

  error_msg = "xyz went wrong"
  log.warn(error_msg)
My comment on the CR was about this being an inherent contradiction and incredibly confusing to know if it's actually an error or a warning..
bandrami 12/21/2025||
It's like how an alert system that sends more than ~8 alerts a day effectively sends zero alerts.
Glyptodon 12/20/2025||
I agree errors should be errors. Many things that are logged for other reasons should use a different label.

That said, the thing I've cone find being useful as a subcategory of error are errors due to data problems vs errors due to other issues.

theli0nheart 12/20/2025||
I agree with this.

Not everything that a library considers an error is an application error. If you log an error, something is absolutely wrong and requires attention. If you consider such a log as "possibly wrong", it should be a warning instead.

dpc_01234 12/20/2025||
Error log level should be renamed. It's just a terrible name that confuses usage.
fogzen 12/21/2025|
Yeah, even alert/warn/info would be an improvement.

I hate the concept of “errors” in general. They’re an excuse to avoid responsibility, and ship broken software with known undefined behavior.

The very notion of an error basically means “there was behavior I chose to not handle and do anything about but which I knew would happen” which is essentially just negligence.

dnautics 12/20/2025||
let's say you a bunch of database timeouts in a row. this might mean that nothing needs to be fixed. But also, the "thing that needs to be fixed" might be "the ethernet cable fell out the back of your server".

How do you know?

raldi 12/20/2025|
You have an alert on what users actually care about, like the overall success rate. When it goes off, you check the WARNING log and metric dashboard and see that requests are timing out.
ImPostingOnHN 12/20/2025||
That is a lagging indicator. By the time you're alerted, you've already failed by letting users experience an issue.
danaris 12/20/2025|||
Well, yes. If the cable falls out of the server (or there's a power outage, or a major DDoS attack, or whatever), your users are going to experience that before you are aware of it. Especially if it's in the middle of the night and you don't have an active night shift.

Expecting arbitrary services to be able to deal with absolutely any kind of failure in such a way that users never notice is deeply unrealistic.

lanstin 12/21/2025||
It continues to become more realistic with the passing of time.
raldi 12/20/2025|||
What alternative would you propose? Page the oncall whenever there's a single query timeout?
dnautics 12/20/2025||
the alternative i propose is have deep understanding of your system before popping off with dumb one size fits all rules that don't make sense.
vpribish 12/20/2025||
I just started playing in the Erlang ecosystem and they have EIGHT levels of logging messages. it seems crazily over-specific, but they are the champions of robust systems.

I could live with 4

Error - alert me now.

Warning - examine these later,

Info - important context for investigations.

Debug - usually off in prod.

emmelaich 12/21/2025||
I need Notice (between Info and Warning), for important events such as start and shutdown, and successfully connecting to the database, and ready to start serving. These otherwise would be in Info; and enabling Info level produces a torrent of uninteresting muck.
regularfry 12/20/2025|||
The eight levels in Erlang are inherited from syslog, rather than something specific to Erlang itself.
groundzeros2015 12/20/2025||
The first one should be crashing.
winningChild 12/20/2025||
I have a collection of cameras, I can take a picture or photos with those cameras. Some of the lenses may not work properly with the lighting. That doesn’t mean the object being photographed is faulty.
tgv 12/20/2025|
I log authorization errors as errors. Are they errors? It depends on how you read the logs. Perhaps you want to distinguish between internal, external and non-attributable errors for easier grepping.
More comments...