Structured logging

What are the best practices for doing structured logging for Workers? https://developers.cloudflare.com/workers/observability/logpush This article seems to be the only resource but it only talks about unstructured console.logs() What should I do? Integrate a third-party service / do my own little implementation of sending structured JSON logs to some storage?
Logpush · Cloudflare Workers docs
Cloudflare Logpush supports the ability to send Workers Trace Event Logs to a supported destination. Worker’s Trace Events Logpush includes metadata …
3 Replies
kian
kian2y ago
kian
kian2y ago
You can pass an object to console.log which you'd see in the LogPush/Tail Worker logs
vassbence
vassbenceOP2y ago
hmm then the docs are not so clear because if json can be added and it’s parses too so not a stringified blob then doing structured logging is easy What does the following limit mean for json? “Message size: Maximum of 300 characters per log line” its from the bottom of the prev link
Want results from more Discord servers?
Add your server