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

logger: convert newlines to spaces in IRC logging handler #2250

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

dgw
Copy link
Member

@dgw dgw commented Feb 8, 2022

Description

Tin. Stupid-simple "fix" for #2207.

/cc @RhinosF1

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

Notes

I discovered while trying to test this on top of #2249 that setting logging_channel_level = DEBUG causes some serious problems. That probably warrants its own issue, but since @Exirel will probably be the one to review this I wanted to see if he has any advice first before I go digging around in things to write up a real report.

@dgw dgw added the Tweak label Feb 8, 2022
@dgw dgw added this to the 7.1.8 milestone Feb 8, 2022
@dgw dgw requested a review from a team February 8, 2022 06:01
Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also consider sending this in multiple messages? IIRC bot.say doesn't allow multi-line messages.

@dgw
Copy link
Member Author

dgw commented Feb 9, 2022

I thought about putting it in multiple messages, but decided not to for two main reasons:

  1. This is a stable-version patch and I don't want to make a significant behavior change
  2. Excessive output already seems to cause problems if the IRC logger is set to DEBUG (see OP notes section), so it doesn't currently seem like a good idea to spit out potentially 5-10 lines per log message

@Exirel
Copy link
Contributor

Exirel commented Feb 9, 2022

Excessive output already seems to cause problems

Maybe it's time to deprecate such logger...

if the IRC logger is set to DEBUG (see OP notes section)

Also we should probably filter out DEBUG in any case for that logger (that's easy to do with logging config).

@dgw
Copy link
Member Author

dgw commented Feb 9, 2022

Excessive output already seems to cause problems

Maybe it's time to deprecate such logger...

The use case is valid, so I wouldn't go that far.

if the IRC logger is set to DEBUG (see OP notes section)

Also we should probably filter out DEBUG in any case for that logger (that's easy to do with logging config).

Probably yes, logging to IRC should not allow the more verbose log levels. Too much output in my testing with logging_channel_level = DEBUG led to a bunch of messages about flooding via handleError, though I don't have the exact output available to copy and paste into this comment rn.

@dgw dgw merged commit b58b5c3 into master Feb 12, 2022
@dgw dgw deleted the irc-logging-tweak branch February 12, 2022 23:18
dgw added a commit that referenced this pull request Feb 12, 2022
logger: convert newlines to spaces in IRC logging handler
@dgw dgw added the Bugfix Generally, PRs that reference (and fix) one or more issue(s) label Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s) Tweak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants