Too long log is badly displayed
pierro-mojito
PROOP

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 ?

Solved

12 Replies

pierro-mojito
PROOP

7 months ago

09c55a6d-dab8-487e-ae2a-c012ad9534de


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?


pierro-mojito
PROOP

7 months ago

Hi @Brody,

Not sure to understand, zap production configuration use JSON by default


pierro-mojito
PROOP

7 months ago

Here the method NewProductionConfig from their github : https://github.com/uber-go/zap/blob/master/config.go#L157


pierro-mojito
PROOP

7 months ago

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.


pierro-mojito
PROOP

7 months ago

Hi @Brody, not possible to make a fix ? Or to report that to the developer team ?


pierro-mojito
PROOP

7 months ago

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.


pierro-mojito
PROOP

7 months ago

Hi @Brody, understood 😉

Can be closed then


7 months ago

And fwiw, i think the limit is 80KB.


7 months ago

!s


Status changed to Solved brody 7 months ago


Loading...