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: allow flush level OFF #319

Merged
merged 4 commits into from Feb 1, 2021
Merged

feat: allow flush level OFF #319

merged 4 commits into from Feb 1, 2021

Conversation

daniel-sanche
Copy link
Contributor

The library takes in a FlushLevel argument, which defaults to ERROR. Any logs at that level or higher will be auto-flushed instead of batched.

It appears there is no way to turn the flush level off, forcing all logs to be batched. This PR checks for Level.OFF, and doesn't set the flush level if it is chosen

Fixes #133 ☕️

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging-logback API. label Jan 30, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 30, 2021
@codecov
Copy link

codecov bot commented Jan 30, 2021

Codecov Report

Merging #319 (3f91889) into master (c0e02ba) will increase coverage by 0.39%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #319      +/-   ##
============================================
+ Coverage     69.03%   69.42%   +0.39%     
- Complexity       40       41       +1     
============================================
  Files             3        3              
  Lines           155      157       +2     
  Branches         17       18       +1     
============================================
+ Hits            107      109       +2     
  Misses           33       33              
  Partials         15       15              
Impacted Files Coverage Δ Complexity Δ
.../google/cloud/logging/logback/LoggingAppender.java 67.85% <100.00%> (+0.46%) 32.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0e02ba...3f91889. Read the comment docs.

@daniel-sanche daniel-sanche changed the title feat: allow flush level OFF fix: allow flush level OFF Jan 30, 2021
@daniel-sanche daniel-sanche changed the title fix: allow flush level OFF feat: allow flush level OFF Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging-logback API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

com.google.cloud.logging.logback.LoggingAppender flush is too slow
2 participants