You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that we should enhance two things regarding logging in mwoffliner, but they are breaking changes.
First, we should prefer to use "standard" log levels. Currently we use 'info', 'log', 'warn', 'error', 'quiet'.
Based on code usage, I would say that:
info means verbose logs about details
log means general messages showing scraper progress
warn means a non-fatal problem occurred
error means a fatal problem occurred
quiet is a fictitious level allowing to disable all logging
The info and log levels are very astonishing when compared to general IT practices. I don't get when someone would want to use the quiet level since we always need to know about errors since they are fatal. If error log level is too verbose, then it needs to be fixed.
I think we should move to more standard levels, replacing info with debug (or verbose) and log with info.
I don't feel like making a distinction between debug and verbose (which exists in many Node.JS logging framework) is needed, I've always found the distinction too blurry and leading to too much back and forth, 4 log levels is sufficient from my PoV.
I also think (this is the second enhancement) that we should move to a standard logging framework (either the standard one or a popular one). I see no reason to have our own logging framework like we do today with the very limited Logger.ts class. This is code to maintain and code limiting the capabilities of the scrapper in terms of logs
The text was updated successfully, but these errors were encountered:
Cleaning up which messages and when they are triggered (like I said here) is a great idea, but I don't see the need to change the names of the levels with the current "home rolled" logging.
IMO the best solution is to move to a standard logging solution and use their levels, which are likely to be close to the ones you've proposed.
I think that we should enhance two things regarding logging in mwoffliner, but they are breaking changes.
First, we should prefer to use "standard" log levels. Currently we use
'info', 'log', 'warn', 'error', 'quiet'
.Based on code usage, I would say that:
info
means verbose logs about detailslog
means general messages showing scraper progresswarn
means a non-fatal problem occurrederror
means a fatal problem occurredquiet
is a fictitious level allowing to disable all loggingThe
info
andlog
levels are very astonishing when compared to general IT practices. I don't get when someone would want to use thequiet
level since we always need to know about errors since they are fatal. Iferror
log level is too verbose, then it needs to be fixed.I think we should move to more standard levels, replacing
info
withdebug
(orverbose
) andlog
withinfo
.I don't feel like making a distinction between
debug
andverbose
(which exists in many Node.JS logging framework) is needed, I've always found the distinction too blurry and leading to too much back and forth, 4 log levels is sufficient from my PoV.I also think (this is the second enhancement) that we should move to a standard logging framework (either the standard one or a popular one). I see no reason to have our own logging framework like we do today with the very limited
Logger.ts
class. This is code to maintain and code limiting the capabilities of the scrapper in terms of logsThe text was updated successfully, but these errors were encountered: