Reference: Stack Overflow
flowchart TD
start{
For whom am I
writing the log
line?
} --Developers--> debug[Debug]
start --System operators--> unwanted_state{
Do I log
because of an unwanted
state?
}
unwanted_state -- No --> info[Info]
unwanted_state -- Yes --> process_can_continue{
Can the
process continue
with the unwanted
state?
}
process_can_continue -- Yes --> warn[Warn]
process_can_continue -- No --> application_can_continue{
Can the
application continue
with the unwanted
state?
}
application_can_continue -- Yes --> error[Error]
application_can_continue -- No --> critical[Critical]