Skip to content

Conversation

@leonardoce
Copy link
Contributor

This patch introduces a new CLI flag --disable-file-logging that allows users to prevent Kopia from writing any log files to disk.

When enabled, this flag disables all file-based logging mechanisms, including the creation of log files and directories.

This is particularly useful in containerized or ephemeral environments where persistent log files are undesirable.

@codecov
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.37%. Comparing base (cb455c6) to head (a0c35fa).
Report is 585 commits behind head on master.

Files with missing lines Patch % Lines
internal/logfile/logfile.go 78.57% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4686      +/-   ##
==========================================
+ Coverage   75.86%   76.37%   +0.50%     
==========================================
  Files         470      529      +59     
  Lines       37301    40192    +2891     
==========================================
+ Hits        28299    30695    +2396     
- Misses       7071     7470     +399     
- Partials     1931     2027      +96     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This patch introduces a new CLI flag `--disable-file-logging` that
allows users to prevent Kopia from writing any log files to disk.

When enabled, this flag disables all file-based logging mechanisms,
including the creation of log files and the related metadata and
directories.

This is particularly useful in containerized or ephemeral environments
where persistent log files are undesirable.

Example usage:

    kopia server start --disable-file-logging --log-level-console=info
@leonardoce leonardoce force-pushed the no-file-based-logging branch from 4b3cb6a to a0c35fa Compare June 23, 2025 13:35
@leonardoce
Copy link
Contributor Author

Thanks @jkowalski for reviewing my patch. What are the following steps to get it merged?

@jkowalski jkowalski merged commit a8fc80f into kopia:master Jun 26, 2025
21 checks passed
@jkowalski
Copy link
Contributor

Thanks @jkowalski for reviewing my patch. What are the following steps to get it merged?

None. I forgot to click the button.

1 similar comment
@jkowalski
Copy link
Contributor

Thanks @jkowalski for reviewing my patch. What are the following steps to get it merged?

None. I forgot to click the button.

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