3 months ago
Railway’s log viewer currently treats application logs as plain text streams. While this works for simple logging, it limits the usefulness of structured logging frameworks commonly used in modern applications such as Winston, Pino, and Bunyan.
Many production systems emit logs as structured JSON objects containing metadata fields such as request IDs, account IDs, error objects, or service context. For example in TS:
logger.warn('Failed to log a whole action.', {
someData,
anotherValue,
foo,
bar,
error,
});
When this get to logs I can only see 'Failed to log a whole action.' I miss context and stack-traces as a result. It would be nice if it custom fields got added to the raw or attributes section in logging.
This could be user error - but other logging solutions I used before porting to Railway (Splunk) seemed to pick this up natively without additional config.
Thanks all!
0 Threads mention this feature
3 Replies
3 months ago
We absolutely support JSON logging, allowing you to filter on any attribute within the JSON log.
These attributes would be displayed alongside the message as long as you have that enabled, and you can click on the log to see more context.
3 months ago
Oops - thanks Brody I had misconfigured Winston output format so the JSON attributes weren't being sent in the first place with the log. I suppose when it worked in the past there may have been some other operations processor side.
Got my solution here https://oneuptime.com/blog/post/2026-01-25-winston-logging-nodejs/view.