cdxgen icon indicating copy to clipboard operation
cdxgen copied to clipboard

Env var for redirecting logs to file

Open maxamel opened this issue 3 months ago • 1 comments

Hello, We're running cdxgen as a sidecar in a pod and cannot touch the entrypoint or command line. Is there any way to capture all logs (stdout + stderr) to a file? I saw these env vars:

CDXGEN_THOUGHT_LOG CDXGEN_TRACE_LOG

But they do not seem to log the stdout and stderr into a file.

maxamel avatar Oct 23 '25 12:10 maxamel

From the documentation:

Variable Description
CDXGEN_THOUGHT_LOG To log cdxgen's internal thinking to a log file, set the environment variable CDXGEN_THINK_MODE and define CDXGEN_THOUGHT_LOG with the desired file path. Without CDXGEN_THOUGHT_LOG, cdxgen defaults to logging to process.stdout.
CDXGEN_TRACE_LOG To trace the external commands and remote hosts accessed by cdxgen to a log file, set the environment variable CDXGEN_TRACE_MODE and define CDXGEN_TRACE_LOG with the desired file path. Without CDXGEN_TRACE_LOG, cdxgen defaults to logging to process.stdout.

You need 2 more variables to activate those logs.

(Mental note to self, or even better an issue: add those 2 variables from the description as separate entries in the documentation!)

malice00 avatar Oct 29 '25 00:10 malice00