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

zapcore: Add ParseLevel #1047

Merged
merged 5 commits into from Jan 13, 2022
Merged

zapcore: Add ParseLevel #1047

merged 5 commits into from Jan 13, 2022

Commits on Jan 13, 2022

  1. Add LevelFromString func

    This adds the public LevelFromString func which enables the user to construct a log level based on ASCII text input
    Techassi committed Jan 13, 2022
    Copy the full SHA
    fd2b68c View commit details
    Browse the repository at this point in the history
  2. Adjust UnmarshalLevel func

    Techassi committed Jan 13, 2022
    Copy the full SHA
    d34f022 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    647e596 View commit details
    Browse the repository at this point in the history
  4. Add tests

    Techassi committed Jan 13, 2022
    Copy the full SHA
    6dca8e8 View commit details
    Browse the repository at this point in the history
  5. test: Minor nits

    - We can use backticks to avoid having to escape quotes
    - Prefer to have the error and non-error paths branch
      so that we're not asserting the value of level in the error case
      (since that's specifically not part of the contract)
    abhinav committed Jan 13, 2022
    Copy the full SHA
    b45b8a9 View commit details
    Browse the repository at this point in the history