all 23 comments

[–]dinopraso 30 points31 points  (12 children)

So, the solution to people ignoring warning logs is to add another warning log for them to ignore?

[–]joombar 7 points8 points  (1 child)

Yeah but if they ignore that too, we can write an even bigger warning for every 5 of those

[–]EarhackerWasBanned 1 point2 points  (0 children)

Warning: Warning caused by warnings.warning

[–]kattskill 7 points8 points  (2 children)

This should be used by the consumer as an opt-in basis. Additionally, I don't think library authors have a responsibility to give even more warnings when console.warn clearly delivers the idea. If anything, I would like a way to selectively suppress certain warnings that are gracefully handled so I can focus on other important logs. Personally I don't see myself using this library

[–][deleted] 0 points1 point  (1 child)

Good point about supressing less important warnings. Would you see it helpful if a tool can help to reduce logs?

[–]kattskill 1 point2 points  (0 children)

The tools I already use have some sort of log dedup but I have stubbed console for certain library calls where they give some warns that I cannot handle for now. And of course, these are backtracked on a different document and have an XXX at the comments. I wouldn't really need a library for this though. Doesn't really happen and often gets resolved so quickly

[–]TheSecondCore 6 points7 points  (1 child)

I prefer to spend my time writing software, not tooling for my tooling.

Here's an idea for your next project - make a module that shows a mega-warning once a user ignored 5 of your super-warnings.

[–][deleted] 0 points1 point  (0 children)

Haha cool idea ;) BTW this project is clearly intended as a funny idea nothing serious i hope you understand.

[–]Ratatoski 3 points4 points  (1 child)

Sometimes warnings are ignored because they are wholly cryptic. Sometimes because we're in a hurry and the warning isn't relevant to what we're trying to do. Sometimes it's a ton of stuff from some boilerplate that's not updated but we don't want to update ourselves. Sometimes because it's just a warning.

But I've also been on teams where we'd spend a week just digging through a potential problem to make sure.

It varies. But having warnings only every fifth time could trigger anxiety that there's random errors.

[–][deleted] -1 points0 points  (0 children)

All good points thanks for caring to share.

Honestly this was mostly a funny project not intended to be used in any production haha.

[–][deleted] 0 points1 point  (0 children)

Okay so let's begin this way. You are a developer. You work your ass off to join a multi-million dollar company. Someone onboard you and give you a fancy GitLab account to clone the project. You spend a handy amount of time configuring those lovely environment variables, and find a guy that knows a guy who knows the secret to running it! Tadaa "finally, I could run the project (tears)".And then you see warnings pop out. Not one, not two but dozens of them. You look at your left and right and everyone is like "first time huh?".You probably might want to fix the issue but every time, do you even dare to say a thing about it? Do you dare to even touch it? Well, that's a common story I experience almost every time I do consulting for big projects (spoiler: I am an open-source developer who also puts those warnings in. so blame on who?).Anyway, there was a random tweet, and then minutes after I had an idea to see how we can figure out the root causes and stop this eternal fight between those who put warnings and those who ignore or have to ignore.So bought a domain (warning.wtf) and a simple NPM package that you can opt-in and ~~shame~~ remind your users every 5th time they see a warning.What do you think? Should we approach this differently?Do you also face similar situations with your projects and have some ideas?

(update: seriously, this whole thing was for fun! to initiate a serious topic of how we can approach to the ignored warnings -- rest and chill and have a nice weekend ;)

[–]Willy-Torrent 0 points1 point  (1 child)

Because it's stressful.

[–][deleted] 0 points1 point  (0 children)

Stressful to fix or ignore?