Skip to content

Send log level to log hook#1178

Closed
nozik wants to merge 1 commit intoopen-telemetry:mainfrom
helios:send_level_to_log_hook
Closed

Send log level to log hook#1178
nozik wants to merge 1 commit intoopen-telemetry:mainfrom
helios:send_level_to_log_hook

Conversation

@nozik
Copy link
Contributor

@nozik nozik commented Jul 4, 2022

Description

Add a log level param to the logging instrumentation log_hook.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Enhanced the existing log_hook test.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@nozik nozik requested a review from a team July 4, 2022 17:40
@nozik nozik changed the title send level to log hook Send log level to log hook Jul 4, 2022
@srikanthccv
Copy link
Member

What is new this adding? Don't you already have the level in LogRecord?

@nozik
Copy link
Contributor Author

nozik commented Jul 4, 2022

@srikanthccv Unfortunately no - the log level isn't available as part of the record itself

@srikanthccv
Copy link
Member

That can't be true? There is both text (levelname) and numeric (levelno) attributes.

@nozik
Copy link
Contributor Author

nozik commented Jul 4, 2022

@srikanthccv Correct, my mistake. Closing the PR

@nozik nozik closed this Jul 4, 2022
@nozik nozik deleted the send_level_to_log_hook branch July 4, 2022 18:49
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