Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Logging Fixes #1184

Merged
merged 2 commits into from
Apr 20, 2017
Merged

More Logging Fixes #1184

merged 2 commits into from
Apr 20, 2017

Conversation

JerziKaminsky
Copy link
Contributor

No description provided.

@ddevault
Copy link
Contributor

No thanks to L_WARN. The other change is fine. Can you rebase?

@JerziKaminsky
Copy link
Contributor Author

Sad to hear it, I needed it. Pushed.

@ddevault
Copy link
Contributor

We generally just log warnings with L_INFO or L_ERROR if they're severe. Not necessary to add another thing.

@JerziKaminsky
Copy link
Contributor Author

JerziKaminsky commented Apr 20, 2017

Logging has its conventions and warnings are a standard thing. I needed something which signals a problem and is stronger than info. For example "Security policy violated but this is a debug build" feels like a warning to me, or "Can't validate target, creating empty policy".

-V is verbose and it's hard to pick out the wheat from the chaff. But I'll live.

@ddevault
Copy link
Contributor

Well, I suppose I would be more open to L_WARN if you went about the codebase and changed everything that should use it (but currently does not). Should be done separately though.

@ddevault ddevault merged commit d2de522 into swaywm:master Apr 20, 2017
@JerziKaminsky JerziKaminsky deleted the logging2 branch April 20, 2017 17:03
@JerziKaminsky
Copy link
Contributor Author

That's a shitton of work. No thanks.

@ddevault
Copy link
Contributor

Really? Doesn't seem that bad to me.

@JerziKaminsky
Copy link
Contributor Author

JerziKaminsky commented Apr 20, 2017

Yeah, well you know the codebase backwards, but I'd have to be confident that I understand the context for every suspect log message. Too steep. If L_WARN makes sense -- merge it, if it doesn't -- don't.

@4e554c4c
Copy link
Contributor

Don't change something that affects the whole codebase if you don't want to change the whole codebase then?

@JerziKaminsky
Copy link
Contributor Author

How does making a new log level available "affect the whole codebase"? what code will it break exactly?

@ddevault
Copy link
Contributor

Well, everything that should use the new log level and doesn't becomes a bug. So without doing all the work you're basically introducing a few dozen bugs.

@JerziKaminsky
Copy link
Contributor Author

JerziKaminsky commented Apr 20, 2017

You're right. Having all the messages which should be a warning report instead as INFO/ERROR would be a real problem, so I guess it's better to leave things as they are and have the messages which should be a warning report instead as INFO/ERROR.

Seriously, there are 134 log INFO/ERROR messages in the codebase and auditing them one by one is simply not something I want to spend time on. If you can't live with stuff being printed exactly as they have been for a couple of years, ok. I hope someone else will step up in the future.

@ddevault
Copy link
Contributor

If you just have a trash bin, then everything you throw out is already in the right place. If you add a recycle bin, however, lots of items in your trash bin are suddenly in the wrong place.

Most of the logging in place is pretty clear. If you don't want to put in the work then that's fine, but it really wouldn't be very difficult. An hour's work at worst.

@JerziKaminsky
Copy link
Contributor Author

JerziKaminsky commented Apr 22, 2017

Cute analogy but I think it misses some important points. Here's my own version:

A man walks up to your house and offers to install a brand new shiny recycle bin, for free. "It's eco-friendly," he says, "and once installed you and your family and visitors can start using it for your recyclables instead of throwing them in the trash". You reply "That is indeed a handsome recycle bin, but I absolutely refuse to have it installed until you, the guy who is offering to install for free, go through my garbage can and place whatever recyclables are there into the new recycle bin.". The man replies "I don't like that idea at all," "I had nothing to do with putting that garbage there, and I have better things to do then go through your garbage. Why don't you just accept the recycle bin, use it from now on, and if anyone walks by your house and sees this or that recyclable in your trash can, they can always fish it out and put it in the bin, if it bothers them." "No," you say "I wouldn't be able to sleep nights knowing that my trash possibly contains recyclables which are going to the landfill instead of the recycling center". "But you've been doing that for years!" the man says, a little alarmed, "what's the difference? isn't it better to just start recycling from now on?", "No, I don't think so," you say, "I'd simpler to not have the recycle bin installed in the first place and then I don't have to think about it." The man shrugs and walks away....

🤷‍♂️
🚶‍♂️
...

ddevault added a commit that referenced this pull request May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants