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

feat: Add debug log mask support #40

Merged
merged 5 commits into from
Aug 21, 2023

Conversation

f5yacobucci
Copy link
Contributor

NGINX supports multiple debug masks to customize logging.

We use Rust's type system to represent these as an enum and ease a developers usage. They can call the ngx_log_debug_mask with any of the supported enum elements.

To aid in keeping in sync with NGINX primitives a unit test will fail when the current FIRST and LAST log masks do not align any longer.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • [ X] I have written my commit messages in the Conventional Commits format.
  • [ X] I have read the CONTRIBUTING doc
  • [ X] I have added tests (when possible) that prove my fix is effective or that my feature works
  • [ X] I have checked that all unit tests pass after adding my changes
  • [ X] I have updated necessary documentation
  • [ X] I have rebased my branch onto master
  • [ X] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

NGINX supports multiple debug masks to customize logging.

We use Rust's type system to represent these as an enum and ease a
developers usage. They can call the ngx_log_debug_mask with any of the
supported enum elements.

To aid in keeping in sync with NGINX primitives a unit test will fail
when the current FIRST and LAST log masks do not align any longer.
src/log.rs Outdated Show resolved Hide resolved
src/log.rs Outdated Show resolved Hide resolved
src/log.rs Outdated Show resolved Hide resolved
src/log.rs Outdated Show resolved Hide resolved
Matthew Yacobucci added 2 commits July 19, 2023 14:41
- Prefer "///" comments
- Reword ngx_log_debug_mask docs
@f5yacobucci
Copy link
Contributor Author

Believe I have everything addressed. Let me know if you're ok and I'll merge.

f5yacobucci and others added 2 commits August 2, 2023 12:06
Build showed private references aren't resolved during macro expansion.
Removing some of the DRY code to solve build.
@f5yacobucci f5yacobucci force-pushed the issue-30-log-support branch from 7151e26 to 5d0d352 Compare August 3, 2023 17:31
@ivanitskiy ivanitskiy merged commit 57c68ff into nginx:master Aug 21, 2023
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.

2 participants