6 ms·
A variant of the "No Screaming" rule (which funnily enough mentions "The only acceptable differentiator is to use different log levels, like WARNING and INFO"):
by quietbritishjim 6y ago
A variant of the "No Screaming" rule (which funnily enough mentions "The only acceptable differentiator is to use different log levels, like WARNING and INFO"):
Don't log at an unnecessarily high level. It's tempting to do this when you're working on a new feature e.g. if everything above WARNING goes to the console maybe you'll make your new feature all WARNING. This is partly just for ease of debugging while you're developing, and partly (especially for junior devs) because it feels like your new feature is way more important than everyone else's so it needs to be logged more loudly. The right way to do this is to make it configurable per-feature what logging levels go to the console.
- mumblemumble 6y agoAfter having spent some time at a company that banned them, I am not even sure that log levels are an acceptable differentiator, anymore. The rationale was that knowing that every single log statement absolutely would be written to the log would encourage developers to think more carefully about their logging. From what I saw, it worked.
- twic 6y agoI work on a small team which does its own operations. Anything logged at WARNING goes to our production radiator. Anything logged at ERROR goes to our production radiator and makes it play an annoying sound. If you overuse WARNING or ERROR logs - as i initially did on joining the team - you will rapidly get feedback from other team members to knock it off.
- quietbritishjim 6y agoWhat is a radiator in this context? A bit of searching didn't turn up anything except metal objects that exchange heat!
- twic 6y agoAh, it means an information radiator, which is a funky term for a big thing on a wall that everyone can see: https://www.leadingagile.com/2017/11/information-radiators-information-vaults/ https://www.leadingagile.com/2017/11/information-radiators-i... In this case, it's a screen displaying monitoring information. And since we're all working from home, it actually means a web page we all have open and keep an eye on. Daftly enough, we don't even call it the radiator, we call it the dashboard, but i thought "radiator" might be a more understandable name!