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

app/log: on-disk log writing #2713

Merged
merged 4 commits into from
Nov 28, 2023
Merged

app/log: on-disk log writing #2713

merged 4 commits into from
Nov 28, 2023

Conversation

gsora
Copy link
Collaborator

@gsora gsora commented Nov 14, 2023

Write debug logs on disk if --log-output-path is specified.

Log files are rotated automatically once the file size reaches 50MB.

Rotated log files will be kept for 7 days - max 10 rotated files will be kept, whatever comes first.

category: feature
ticket: #2671

Write debug logs on disk if `--log-output-path` is specified.

Log files are rotated automatically once the file size reaches 50MB.

Rotated log files will be kept for 7 days - max 10 rotated files will be kept, whatever comes first.
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (4fa4f30) 53.36% compared to head (ed956bd) 53.23%.

Files Patch % Lines
app/log/config.go 37.50% 22 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2713      +/-   ##
==========================================
- Coverage   53.36%   53.23%   -0.13%     
==========================================
  Files         199      199              
  Lines       27397    27428      +31     
==========================================
- Hits        14621    14602      -19     
- Misses      10969    11014      +45     
- Partials     1807     1812       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

app/log/config.go Outdated Show resolved Hide resolved
Logger: &lumberjack.Logger{
Filename: u.Path,

MaxBackups: 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: add a const for MaxBackups field and a godoc for that const

Copy link

sonarcloud bot commented Nov 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gsora gsora added the merge when ready Indicates bulldozer bot may merge when all checks pass label Nov 28, 2023
@obol-bulldozer obol-bulldozer bot merged commit feb0192 into main Nov 28, 2023
15 checks passed
@obol-bulldozer obol-bulldozer bot deleted the gsora/on-disk-logging branch November 28, 2023 09:25
xenowits pushed a commit that referenced this pull request Dec 12, 2023
Write debug logs on disk if `--log-output-path` is specified.

Log files are rotated automatically once the file size reaches 50MB.

Rotated log files will be kept for 7 days - max 10 rotated files will be kept, whatever comes first.

category: feature
ticket: #2671
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants