Closed redink closed 6 years ago
If the purpose is aggregation, then I would suggest you to enable the Logger tags and include the application as a tag. This way you can aggregate everything that comes from DBConnection. We can also add more tags but I don't think we should remove useful information from the message (and I do find the PID useful).
Thank you.
But how to enable Logger tags ?
I only know how to use metadata
, and if I want to use metadata
, I have to change the method to call Logger.error
. So I am not sure how to do without change this code.
Mix/Logger will add the metadata application: :db_connection
to the Logger.error
calls. Also a callback module can call Logger.metadata
in the connect
callback to add extra metadata
. Note that these calls can also be identified with module: DBConnection.Connection
metadata.
pid
is not useful here, but it will not easy to aggregate error log withpid
.