Click here to Skip to main content
15,898,035 members

Survey Results

How do you log errors in your applications?

Survey period: 29 Jan 2018 to 5 Feb 2018

Knowing you have a problem is the first step in fixing it.

OptionVotes% 
I log to a third party service (eg errlog.io)1148.86
I log to our own logging service26420.51
I log errors to syslog or the native OS logging system18814.61
I log errors to a database34626.88
I log errors to a file63449.26
I log errors via a messaging service such as email, HipChat etc1259.71
I log errors using other methods917.07
I don't log errors in my applications35127.27
Errors? My applications don't produce errors!947.30
Respondents were allowed to choose more than one answer; totals may not add up to 100%



 
GeneralI see we have 7 Klingons! Pin
OriginalGriff28-Jan-18 23:08
mveOriginalGriff28-Jan-18 23:08 
GeneralRe: I see we have 7 Klingons! Pin
Daniel Pfeffer29-Jan-18 21:27
professionalDaniel Pfeffer29-Jan-18 21:27 
GeneralOwn Logging System / Database with retention time Pin
Mike (Prof. Chuck)28-Jan-18 22:26
professionalMike (Prof. Chuck)28-Jan-18 22:26 
GeneralLogging Pin
Simon_Whale28-Jan-18 22:04
Simon_Whale28-Jan-18 22:04 
GeneralOwn Log file always rocks...! Pin
koolprasad200328-Jan-18 19:38
professionalkoolprasad200328-Jan-18 19:38 
GeneralRe: Own Log file always rocks...! Pin
theoldfool30-Jan-18 1:41
professionaltheoldfool30-Jan-18 1:41 
GeneralIf only I knew... Pin
Sander Rossel28-Jan-18 19:37
professionalSander Rossel28-Jan-18 19:37 
GeneralRe: If only I knew... Pin
Mike (Prof. Chuck)29-Jan-18 0:33
professionalMike (Prof. Chuck)29-Jan-18 0:33 
"And, of course, no one really knows what to log (at my previous employer we had to log EVERYTHING, which of course became unreadable...)."


Not always unreadable.
That's where log levels and a database log which can be filtered, wins over a plain file logging.
Key is also a structured way of writing your logs. We even have defined formatting rules for log lines. How and where variable values have to printed, what's in quotes and what not, what is in [brackets], how lists have to be logged, etc.
We even do code reviews over the log lines.
Nothing can crush your error investigation more than an unstructured pile of "lines" where everybody writes in the log what's in his mind in a specific moment.
The log is the most important thing in finding errors. This is nothing that "has to be done also", but more something that needs BIG attention and effort to keep it in structure. You win in the long run, when errors occur in production and you need to find their source...

If the structure of the log is clear you can also write crawlers that do a pattern matching and find unusual constellations, fully automated with a low rate of false positives.

You need a very performant db layer with background write that can handle high log density, but the debug level may spam. you only know that you needed a specific log line AFTER the error occurred, so you have a chance to trace back to the origin.

GeneralRe: If only I knew... Pin
Sander Rossel29-Jan-18 0:38
professionalSander Rossel29-Jan-18 0:38 
GeneralRe: If only I knew... Pin
Mike (Prof. Chuck)29-Jan-18 1:19
professionalMike (Prof. Chuck)29-Jan-18 1:19 
GeneralRe: If only I knew... Pin
Sander Rossel29-Jan-18 6:13
professionalSander Rossel29-Jan-18 6:13 
GeneralRe: If only I knew... Pin
Mike (Prof. Chuck)29-Jan-18 7:40
professionalMike (Prof. Chuck)29-Jan-18 7:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.