Skip to content

Added context injection and logger limit#16

Closed
MarkSeufert wants to merge 2 commits intomasterfrom
logs-sdk-update
Closed

Added context injection and logger limit#16
MarkSeufert wants to merge 2 commits intomasterfrom
logs-sdk-update

Conversation

@MarkSeufert
Copy link
Copy Markdown

@MarkSeufert MarkSeufert commented Dec 9, 2020

This PR makes the following additions to the logging SDK:

  • The SDK’s Logger injects the relevant fields of the LogRecord if the user didn’t specify them. The fields that get injected are timestamp, severity, traceid, spanid, and traceflags.
  • Added a logger limit to the SDK LoggerProvider (relevant spec issue), where the GetLogger(name) method returns a noop logger if the limit has been reached.
  • Unit tests for the above functionality.

The CI tests will fail until the recent API PR gets merged since it uses its trace_flag -> trace_flags change and Severity:kInvalid = 0 change.

cc - @xukaren @alolita

Copy link
Copy Markdown

@alolita alolita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work?

gtest_add_tests(
TARGET ${testname}
TEST_PREFIX logs.
TEST_LIST ${testname})

@kxyr kxyr closed this Dec 9, 2020
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.

3 participants