Skip to contentSkip to conversation

logging level conventions

DISCUSSION Vernon Mauery 3 participants 3 messages Jan 14, 2019 – Jan 16, 2019

lore
Share & tools
lore
#0 lore raw

When making a change in netipmid, the conversation came up about user errors versus system errors. There are times that both should be logged, but obviously system errors are more severe. So in that project, I made system errors (like failure to communicate on dbus, etc.,) as log<ERR>() and user errors (like bad credentials) as log<INFO>().

Does anyone else think that the project as a whole should make this distinction between system errors and user errors? Maybe add something to the coding style?

--Vernon

#1 lore raw

Agree, hopefully it is being done this way already.

Quoted 12 lines · Vernon Mauery

When making a change in netipmid, the conversation came up about user errors versus system errors. There are times that both should be logged, but obviously system errors are more severe. So in that project, I made system errors (like failure to communicate on dbus, etc.,) as log<ERR>() and user errors (like bad credentials) as log<INFO>().

Does anyone else think that the project as a whole should make this distinction between system errors and user errors? Maybe add something to the coding style?

--Vernon

#2 lore raw
In reply to Vernon Mauery
Quoted 3 lines · Vernon Mauery

When making a change in netipmid, the conversation came up about user errors versus system errors. There are times that both should be logged, but obviously system errors are more severe. So in that project, I made system errors (like failure to communicate on dbus, etc.,) as log<ERR>() and user errors (like bad credentials) as log<INFO>().

Does anyone else think that the project as a whole should make this distinction between system errors and user errors? Maybe add something to the coding style?

Agree, if there are no objections to this we should add it to the coding guidelines so that the new developers benefit.

Quoted 3 lines

--Vernon