Log filtering issue
romanindermuehle
FREEOP

6 days 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?

$10 Bounty

6 Replies

uxuz
MODERATOR

6 days 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
FREEOP

6 days 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.


uxuz
MODERATOR

6 days ago

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


romanindermuehle
FREEOP

6 days ago

Ah okay, thanks.

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


brody
EMPLOYEE

6 days ago

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


romanindermuehle
FREEOP

6 days 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?


Loading...