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

chg: Set BrowscapPHP logging from default DEBUG to INFO #9598

Merged
merged 1 commit into from May 2, 2024

Conversation

brlogan
Copy link
Contributor

@brlogan brlogan commented Feb 29, 2024

In the browscapGetBrowser() function of class UserLoginProfile, Mongolog is used for logging of BrowscapPHP.

It seems that Mongolog will default to DEBUG if a log level is not set. This results in a huge number of entries in the Apache error log, and since we are not debugging BrowscapPHP in production, these entries are unwanted.

Example log entry:

[2024-02-09 04:49:46] name.DEBUG: cache key "browscap.patterns.df" was empty [] []

What does it do?

Code change adds a Mongolog StreamHandler set to INFO.
This significantly reduces the log output from BrowscapPHP.

If anyone has a better way of resolving this issue, I'd be happy to see it.

Questions

  • Does it require a DB change? No
  • Are you using it in production? Yes
  • Does it require a change in the API (PyMISP for example)? No

@iglocska
Copy link
Member

Thanks a lot, merged into develop, it should be in the next release!

@iglocska iglocska merged commit b6a8d43 into MISP:2.4 May 2, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants