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
currently logs produced by shlink are in json format
{"level":"debug","ts":1735825779291448689,"logger":"rpc","msg":"plugin was started","address":"tcp://127.0.0.1:6001","list of the plugins with RPC methods:":["lock","informer","app","jobs","resetter"]}
{"level":"debug","ts":1735825779292705823,"logger":"memory","msg":"pipeline was started","driver":"memory","pipeline":"shlink","start":"2025-01-02 13:49:39.292702233 +0000 UTC","elapsed":"9.538µs"}
however, logs produced by road runner are not
2025-01-02T15:05:42+0000 INFO server [2025-01-02T15:05:42.301007+00:00] [95b60df1-7d85-4a59-8903-c0a7cc2ee4bb] Access.INFO - POST /rest/v3/short-urls 200 392
2025-01-02T15:05:44+0000 INFO server [2025-01-02T15:05:44.093284+00:00] [096a379e-3372-4449-a5ed-38466ea32b64] Access.INFO - POST /rest/v3/short-urls 200 392
update road runner config to also log in json format
Use case
we forward our logs to newrelic. like many other log destinations, logs received in json format are automatically parsed whereas logs received in text format are not. it is possible to configure custom parsers but this can be very fiddly
also, it seems like a good thing to have all logs in the same format 🙂
The text was updated successfully, but these errors were encountered:
This is actually trickier. The logs above are in fact generated by RoadRunner, but they are JSON-formatted, even though the docs state they should be in a different format by default.
However, I know it produces other logs which are not JSON, probably due to some inconsistency between its logs channels.
On top of that, the logs below (access logs) are in fact generated by Shlink 😅.
Additionally, changing the logs format is a breaking change, so it needs to be configurable.
But that said, I do agree it makes sense for Shlink (and the tools used by it) to produce logs in consistent formats.
acelaya
changed the title
structured logging in road runner
Support consistent logs format
Jan 2, 2025
Summary
currently logs produced by shlink are in json format
however, logs produced by road runner are not
update road runner config to also log in json format
Use case
we forward our logs to newrelic. like many other log destinations, logs received in json format are automatically parsed whereas logs received in text format are not. it is possible to configure custom parsers but this can be very fiddly
also, it seems like a good thing to have all logs in the same format 🙂
The text was updated successfully, but these errors were encountered: