Skip to content
Log filtering issue
romanindermuehle
OP

10 months ago

I noticed when I try to filter here with: @level:warn all the logs disappear even though there are logs with level warning. What can I do?

Closed$10 Bounty

6 Replies

10 months ago

Hey, you would need structured JSON logs with the level attribute for Railway to filter by attributes. https://docs.railway.com/guides/logs#structured-logs


romanindermuehle
OP

10 months ago

Hey, currently I use this library for logging: https://github.com/apple/swift-log

So I assumed this would be enough to provide the needed metadata.


10 months ago

Sorry, but if this doesn't support JSON logging then it is not going to work.


romanindermuehle
OP

10 months ago

Ah okay, thanks.

Or do you know if it's possible to create custom filters for these levels? Or even OTel support?


10 months ago

If you are using plaintext logs then you need to do a plaintext search - "[ WARNING ]"


romanindermuehle
OP

10 months ago

Would it be also possible to set alarms to it?

So that either when within 5min 2 "[ WARNING ]" or "[ Error ]" gets logged to the console or based on http staus codes?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...