Can the logger parse my logs to get correct data like log levels?

Hello. I am outputting json logs to the console, and they have all the info embedded in them to indicate timestamp and logging level, but I keep getting the default info from’s built in timestamp and “info” level log.

Is there a config or parsing script somewhere I can set up to make the logger show the log level and timestamp from my own json entries? Or is this too much to ask of the platform as it is right now?

We currently do not perform any transformations on the logs before shipping them out. But using our log-shipper app which uses vector you could add your own custom parsing before shipping them anywhere you want: Transforms reference | Vector documentation

Then is it possible to activate some flag or other that strips the prefix adds to each log?
2023-04-24T05:41:24Z app[8cf03253] lax [info] ← This part

That would at least let me run it through my own local parser.

No, unfortunately, you can not do that at the moment. Your parser would have to strip that away too, and the log-shipper makes that easy cause it can be instructed to transform the individual log line to JSON which lends itself to more manipulation. Also if you running locally you could subscribe/manually to the nats stream and pipe it into whatever you want: GitHub - superfly/fly-log-shipper: Ship logs from fly to other providers

Alright. Thanks for the info. I’ll look into this log shiopper you have linked. I appreciate it!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.