Skip to content

Enable verbose logging in signal-cli if log level is debug#808

Open
EvanHahn wants to merge 1 commit into
bbernhard:masterfrom
EvanHahn:verbose-signal-cli-logging-if-debug-level-is-high-enough
Open

Enable verbose logging in signal-cli if log level is debug#808
EvanHahn wants to merge 1 commit into
bbernhard:masterfrom
EvanHahn:verbose-signal-cli-logging-if-debug-level-is-high-enough

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

@EvanHahn EvanHahn commented Mar 6, 2026

Feel free to reject if this isn't desired.

If the log level is debug (either with the LOG_LEVEL environment variable or configuration option), enable verbose logging in signal-cli.

I thought it'd be useful to enable verbose logging in signal-cli. This does that automatically.

If the log level is `debug` (either with the `LOG_LEVEL` environment
variable or configuration option), enable verbose logging in
`signal-cli`.
@bbernhard
Copy link
Copy Markdown
Owner

Thanks for the PR!

The problem I see here is, that the additional output that is returned breaks actual REST API endpoint. So, while additional debug info is logged, the actual REST API endpoint might not return any data anymore (as the data can't be parsed anymore).

@EvanHahn
Copy link
Copy Markdown
Contributor Author

EvanHahn commented Mar 7, 2026

Good point. Could this be added to JSON RPC mode (maybe with a separate environment variable)? Again, feel free reject if this isn't desired.

@bbernhard
Copy link
Copy Markdown
Owner

bbernhard commented Mar 7, 2026

I think in json-rpc mode the logs are written to stdout, so we don't see them. But it looks like that signal-cli offers the possibility to log to a file:

--log-file LOG_FILE
Write log output to the given file. If --verbose is also given, the detailed logs will only be written to the log file.

So, I guess what would work is:

  • Introduce a new verbose log level
  • if the verbose log level is set, the signal-cli binary is also called with the --log-file parameter

Since we are logging into a file then, I think that should then also for the normal and native mode without problems.

Would that be fine for your use case?

@EvanHahn
Copy link
Copy Markdown
Contributor Author

EvanHahn commented Mar 12, 2026 via email

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