WHAT IS YOUR FAVORITE LOGGER?

Hi all 👋 I'd love to know what is the 'best' logging solution I can use in my T3 app? Also, a few weeks ago there was some talk that a good error handling tutorial is needed, do you know of a good resource to learning best practices in error handling? Thank you for your time!
Solution:
console.log
Jump to solution
38 Replies
Mendy
MendyOP2y ago
P.S. I know about axiom.io for centerlized logging but I mean what do use insids your code?
Solution
Anna | DevMiner
console.log
Finn
Finn2y ago
console for rust: panic(<message>)
Anna | DevMiner
<pre>{content}</pre} and then window.print()
Mendy
MendyOP2y ago
Oh shoot. It's one of those questions 😬
Finn
Finn2y ago
no, genuinely it is, others may disagree, but i rely more on my log ingest tools such as cloudwatch ive never bothered to setup a logger personally just console.log console.error and some times console.warn. cases where i might consider using a logger is when i wan to log something for debugging but the thing i want to log is sensitive data such as personally identifiable data
Mendy
MendyOP2y ago
If you needed a logger, do you have a go-to?
Finn
Finn2y ago
ive never gone to unfortuately ive heard winston exists /shrug what features are you looking for? cus
const lOGGER = {
debug: (...thing: unknown[]) => {
if (proccess.env.NODE_ENV !== "production") {
console.log("DEBUG: ", ...thing)
...ect
const lOGGER = {
debug: (...thing: unknown[]) => {
if (proccess.env.NODE_ENV !== "production") {
console.log("DEBUG: ", ...thing)
...ect
could surfice
Mendy
MendyOP2y ago
For backend console is sufficient. For front end, I want to see what happened so I need to send log info (Right?)
Finn
Finn2y ago
ohh sentry?
Mendy
MendyOP2y ago
Yes something like that Or that 🤔
Finn
Finn2y ago
i was more thinking in terms of a logger for a service maybe i have zero clue tbh
Scot
Scot2y ago
I’ve always used Winston And then formatted to add in request ids and timestamps, also Otel packages will auto use loggers like that which is nice (unsure if they do for console.log)
Finn
Finn2y ago
No clue what otel is
Scot
Scot2y ago
Open telemetry Kinda wanna try it out in trpc and see how well it works
᲼᲼᲼
᲼᲼᲼2y ago
i saw theo shit on sentry and suggested axiom over it. but he talked about backend logs. not sure if axiom is good with frontend logs/error handling
Scot
Scot2y ago
I was talking about loggers in app, if you mean where do you store your logs that’s different question I’ve mainly used cloud watch and sumo logic in the past Frontend straight to Sumo Backend > cloud watch logs > sumologic
Finn
Finn2y ago
Cloud watch is just so easy The UI sucks tbh, but it works
Scot
Scot2y ago
Agree Sumologic is a bit more powerful as it’s a dedicated logging solution So that’s useful
Finn
Finn2y ago
Not heard of it, I'm guessing it just injests logs and let's you do stuff
Scot
Scot2y ago
Pretty much, also allows you to injest metrics and stuff but we mainly used it for logs and creating some dashboards powers by logs
Finn
Finn2y ago
I see nice
Scot
Scot2y ago
And has like a single query place where you can query all logs
Finn
Finn2y ago
We tend to just ust was for that but it's probably harder I see. Nice
Scot
Scot2y ago
Logging tools are pretty expensive
Finn
Finn2y ago
Aws*
Scot
Scot2y ago
Yeah we were pretty much fully on aws
Finn
Finn2y ago
Yup I guess that's why we use aws got our graphs
Scot
Scot2y ago
Sumo was one of only non aws things Along with honeycomb
Finn
Finn2y ago
I see
Scot
Scot2y ago
And snowflake
Finn
Finn2y ago
Lol
Scot
Scot2y ago
Snowflake was really a fkn game changer
Finn
Finn2y ago
What does it do
Scot
Scot2y ago
Anyways not really related to question but all those are good things to think about when logging 🙂 Maybe ask in something that isn’t this chat :p
Finn
Finn2y ago
Fair
tom
tom2y ago
GitHub
GitHub - unjs/consola: 🐨 Elegant Console Logger for Node.js and Bro...
🐨 Elegant Console Logger for Node.js and Browser . Contribute to unjs/consola development by creating an account on GitHub.
Finn
Finn2y ago
looks cool
Want results from more Discord servers?
Add your server