telefonicaid / iotagent-node-lib

Module to enable IoT Agent developers to build custom agents for their devices that can easily connect to NGSI Context Brokers
https://iotagent-node-lib.rtfd.io/
GNU Affero General Public License v3.0
60 stars 85 forks source link

Add init logs and improve log traces #1452

Open mapedraza opened 11 months ago

mapedraza commented 11 months ago

Describe the solution you'd like

Add initial log block and make it independent from log level (always printed). Improve log traces

AlvaroVega commented 11 months ago

Current log levels provided for logops are 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'

https://github.com/telefonicaid/logops/blob/5310b7516caf857ef4ecafc966fe8f9e9f77db81/lib/logops.js#L19-L20

Maybe we can still use any of these levels ( FATAL or ERROR to ensure log is always procuded) and include any new string like "INIT" at log statup

fgalan commented 11 months ago

It would be great to check with Operations that a new INIT loglevel is ok with them. For instance, the log management tool could be ignoring all except the classic 5 ones.