ETOS logger should send a properly formatted event
Opened this issue · 0 comments
t-persson commented
Description
Today the ETOS Library RabbitMQ logger will send the log events as a JSON string with the logging fields but a proper ETOS event should be formatted as follows:
{"event": EventType, "data": Data}
Where EventType should be "message" and Data should be the logging fields, in the case of the RabbitMQ logger.
There is an assumption in the log listener that if the "event" key is not set, it should be parsed as a message. This is not good.
Additional Context
I want to create a central log listener for ETOS and this assumption will make the code more complex.
Further links
https://github.com/eiffel-community/etos-library/blob/main/src/etos_lib/logging/formatter.py#L61