FileFlows icon indicating copy to clipboard operation
FileFlows copied to clipboard

Suggestion: Expand Logging Levels to the full RFC 5424 set

Open lucanos opened this issue 2 years ago • 3 comments

Having the log levels limited to the current set - Debug, Info, Warning, Error - sees log messages (both those generated by FileFlows itself as well as from User-created Flow events) at the wrong levels.

It would be great to expand the range of levels to the full "Severity" range set out in RFC 5424:

  • Emergency: system is unusable
  • Alert: action must be taken immediately
  • Critical: critical conditions
  • Error: error conditions
  • Warning: warning conditions
  • Notice: normal but significant condition
  • Informational: informational messages
  • Debug: debug-level messages

lucanos avatar Aug 25 '22 23:08 lucanos

what's the use case for this?

revenz avatar Sep 02 '22 00:09 revenz

It allows for much more granular filtering of log messages.

At present, FileFlow has four of the eight recommended message levels, meaning messages are often misclassified which, in turn, means that debugging a new flow sees the user flooded with messages which could safely be muted.

So, the RFC recommended messages levels are:

  • Emergency: system is unusable
  • Alert: action must be taken immediately
  • Critical: critical conditions
  • Error: error conditions
  • Warning: warning conditions
  • Notice: normal but significant condition
  • Informational: informational messages
  • Debug: debug-level messages

(Items in bold are levels supported by FileFlows.)

As it stands, alot of routine log messages, generated by FileFlow as routine are logged at an "Info" and "Debug" level. When a new user (like myself) starts creating Flows, I am stuck with the decision of either using the appropriate message levels of "Info" or "Debug" (and getting lost in the flood of routine log messages) or making my debugging log messages "Warning" or "Error" level, when they are neither a warning or an error.

As an aside, I think alot of the existing routine messaging could probably also be reclassified to a "Debug" level.

lucanos avatar Sep 02 '22 02:09 lucanos

TBH I'm not convinced. you mention flow, which means the file log and not the system log. And the file logs now are pretty small, and each step can be easily viewed separately, so most of the time, the steps are like 20 lines maximum unless an external process was started then that logging is just a raw dump from that process (e.g ffmpeg).

I'll leave this open for now, if someone can convince me of an actual problem this would solve and not just more work just for the sake of more work.

revenz avatar Sep 02 '22 04:09 revenz