orchestracities / ngsi-timeseries-api

QuantumLeap: a FIWARE Generic Enabler to support the usage of NGSIv2 (and NGSI-LD experimentally) data in time-series databases
https://quantumleap.rtfd.io/
MIT License
38 stars 49 forks source link

[Feature request] JSON logs #647

Open arturohu opened 2 years ago

arturohu commented 2 years ago

It would be great to have the possibility to set the console log format as JSON.

Something like a new environment variable to set the usual format or JSON.

c0c0n3 commented 2 years ago

Hi @arturohu!

Thanks for your suggestion. At the moment, we have no resources to implement this feature but we welcome contribs!

Actually it shouldn't be too difficult to do, using e.g.

to add a new formatter here:

the JSON record should have the same content as that of the current formatter---i.e. it should be in line w/ the log content other FIWARE components output.