I’m always struggling with the method/level to use when logging from my application. In his Modern Structured Logging With Serilog and Seq pluralsight course Jason Roberts explains it this way:
Level | Explain | Example |
---|---|---|
Verbose | how technical | “calculated hash {hash} for order {id}” |
Debug | how functional | “applied vip discount to user {user}” |
Information | what | “created order {id}” |
Warning | problems | “save of order {id} failed, will retry in 5 sec” |
Error | unexpected failure | “saved of order {id} failed” |
Fatal | critical/stop | “unhandled exception” |
We have adopted this and have improved our logging quality.
If everything seems to be going well, you have obviously overlooked something
Murphy’s law