7 months ago
Hi guys,
I found that long logging are badly displayed in the console using golang & zap library, here a little replica that you can deploy : https://github.com/FournyP/railway-logging-too-long
It is a issue from zap library or it is something known by Railway ?
12 Replies
7 months ago
Hello,
This is expected when the application does not use the recommended JSON logging, can you switch your MRE to JSON and report back?
Hi @Brody,
Not sure to understand, zap production configuration use JSON by default
Here the method NewProductionConfig from their github : https://github.com/uber-go/zap/blob/master/config.go#L157
I use this configuration for my deployment and it's well displayed as JSON. I can navigate through objects etc
But when the context is too big, railway console seems to not properly display the JSON
7 months ago
This looks more like we don't try to parse a message as JSON if the log line is past a certain length.
You will have to keep the attribute lengths to a reasonable limit.
Hi @Brody, not possible to make a fix ? Or to report that to the developer team ?
Because for debug logs, I like to put a lot of information. But if the logs are unreadable, it's not usefull 😕
7 months ago
I'm sorry but this wouldn't be a priority for us right now since we are going to be redesigning the log ingestion pipeline.
7 months ago
And fwiw, i think the limit is 80KB.
7 months ago
!s
Status changed to Solved brody • 7 months ago