log level in logs view - how is it determined?
rgarcia
PROOP

a year ago

Hi,

How does the logs viewer determine the log level for logs? It somehow knows, for example, that this plaintext (i.e. not JSON) log emitted from my app is an error log:

2024/09/10 13:37:10 failed to upload metrics: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:4317: connect: connection refused"

Is it simply looking for an "error" in the message?

Thanks,

Raf

Solved

2 Replies

Hey! If it's not a structured log output, we'd go off the standard output stream you're logging to.

stdout is interpreted as INFO, and stderr is interpreted as ERROR. So with the behaviour you're seeing, I would expect that you're logging errors to stdout (which is great!)


Status changed to Awaiting User Response Railway over 1 year ago


rgarcia
PROOP

a year ago

Thanks! That makes sense.


Status changed to Awaiting Railway Response Railway over 1 year ago


Status changed to Solved ray-chen over 1 year ago


Loading...