H4ad / nodejs-logging-proposal

3 stars 0 forks source link

Use log levels from rfc5424 #2

Closed H4ad closed 6 months ago

H4ad commented 6 months ago

At https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1, page 11.

Suggested by Matteo.

H4ad commented 6 months ago

~Blocked by #4~

Unblocked, we can just rewrite the new log levels directly.

H4ad commented 6 months ago

@mcollina About this suggestion, these are the log levels:

Numerical       Severity
0               Emergency: system is unusable
1               Alert: action must be taken immediately
2               Critical: critical conditions
3               Error: error conditions
4               Warning: warning conditions
5               Notice: normal but significant condition
6               Informational: informational messages
7               Debug: debug-level messages

Do you think we should keep the log level number as 0-7? Or even allow the users to customize the log level?

I think we maybe will need to be more opinionated here, so probably sticking with 0-7 and also do not allow new log levels.

H4ad commented 6 months ago

About Facility, I think we don't need to introduce that multiplication.

mcollina commented 6 months ago

Keep them fixed for now.

H4ad commented 6 months ago

I updated the current implementation to use these new log levels.

I also added the silent with the value -Infinity.