Too long log is badly displayed
pierro-mojito
PROOP

a year 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

a year ago

09c55a6d-dab8-487e-ae2a-c012ad9534de


a year 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

a year ago

Hi @Brody,

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


pierro-mojito
PROOP

a year ago

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


pierro-mojito
PROOP

a year 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


a year 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

a year ago

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


pierro-mojito
PROOP

a year ago

Because for debug logs, I like to put a lot of information. But if the logs are unreadable, it's not usefull 😕


a year 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

a year ago

Hi @Brody, understood 😉

Can be closed then


a year ago

And fwiw, i think the limit is 80KB.


a year ago

!s


Status changed to Solved brody 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...