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

Feature: Configurable Log Level #205

Open
jeremyjpj0916 opened this issue May 23, 2020 · 5 comments
Open

Feature: Configurable Log Level #205

jeremyjpj0916 opened this issue May 23, 2020 · 5 comments
Assignees

Comments

@jeremyjpj0916
Copy link

jeremyjpj0916 commented May 23, 2020

Would like this to be a environment variable we can set:

https://github.com/SpiderLabs/ModSecurity-nginx/blob/master/src/ngx_http_modsecurity_log.c#L33

ngx_log_error(NGX_LOG_INFO, (ngx_log_t *)log, 0, "%s", msg);

NGX_LOG_INFO is nice and appropriate likely for warning messages generally speaking. But info in many NGX deployments is too noisy regarding other things, so it would be nice if this was default to INFO but I could pick ERROR or DEBUG or NOTICE etc. Right now I drop in a patch file and run this line as:

ngx_log_error(NGX_LOG_ERROR, (ngx_log_t *)log, 0, "%s", msg);

Because that is the log level I want WAF detection information to run on for my use case.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale label Jun 23, 2020
@zimmerle zimmerle removed the stale label Jun 23, 2020
@zimmerle
Copy link
Contributor

zimmerle commented Jul 3, 2020

Hi @jeremyjpj0916,

We have had discussions about those being INFO/ERROR/NOTICE in the past. We have had code changes about that as well. The biggest concern in the past was the correctness of the logging info inside Nginx, not the verbosity. In terms of it being too many massages, is not something that you can treat withing the rules?

@zimmerle zimmerle self-assigned this Jul 3, 2020
@jeremyjpj0916
Copy link
Author

for me the reason i care about log level is very specifically openresty provides a lib to help pull various log messages by status, and in our code I need it to be of an error type for other code to pick up on it, so imo flexibility is always good, especially around various application log levels.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@jeremyjpj0916
Copy link
Author

Bad bot.

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

No branches or pull requests

2 participants