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

Add #[test_log(default_log_filter = "___")] #33

Closed
wants to merge 2 commits into from

Commits on Oct 30, 2023

  1. Refactor into try_test + syn::Result

    syn::Result allows us to return spanned errors which can be converted
    into nice compile errors when there is unexpected input.
    
    For example:
    ```
    error: Failed to parse value, expected a string!
      --> tests/mod.rs:94:33
       |
    94 | #[test_log(default_log_filter = 6)]
       |                                 ^
    ```
    DarrenTsung committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    44f5f85 View commit details
    Browse the repository at this point in the history
  2. Add #[test_log(default_log_filter = "___")]

    Users can now specify a default_log_filter via #[test_log(default_log_filter = "foo")]
    which will be used when RUST_LOG is not specified.
    
    Please note that because env_logger / tracing is initialized globally,
    it is possible that this value will be ignored if they have already been
    initialized by a different test.
    
    Fixes: d-e-s-o#25
    DarrenTsung committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    7304f52 View commit details
    Browse the repository at this point in the history