feat: add --log-file and --log-level options#148
Merged
Conversation
2b84464 to
2722651
Compare
2722651 to
feb2918
Compare
9685be5 to
4045618
Compare
For testing LOG_TO_FILE support end-to-end before it lands in getsentry/mini_chromium. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Forward the path to mini_chromium via LoggingSettings::log_file_path, so handler log output is written to the specified file using the LOG_TO_FILE destination. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Accept `--log-level=N` and apply it to mini_chromium's minimum log severity before any logging occurs. Pre-scanned from argv alongside `--log-file=` so option-parse diagnostics are already filtered. N is the LogSeverity integer (-1=verbose, 0=info, 1=warning, 2=error, 4=fatal). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e000ad6 to
401d49e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 401d49e. Configure here.
The argv pre-scan only matched the --log-file=VALUE form, so the space-separated form accepted by getopt_long (--log-file VALUE) was silently ignored and logging was never configured from it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
66f988e to
b76f0c8
Compare
mujacica
approved these changes
Apr 20, 2026
JoshuaMoelans
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds
--log-fileand--log-leveloptions for the crashpad backend in sentry-native:Forward log-file path and minimum severity to
mini_chromium(getsentry/mini_chromium#6), so handler log output can be redirected to a file and filtered to the requested severity.--log-file=FILEwrites handler log output toFILEusing theLOG_TO_FILEdestination.--log-level=Nsets the minimumLogSeveritythat is emitted (-1=verbose, 0=info, 1=warning, 2=error, 4=fatal). Default remainsLOG_INFO.Both options are pre-scanned from
argvbeforeInitCrashpadLoggingso they take effect early enough to cover option-parse diagnostics.See also: