Skip to content

Is it possible to disable logging to stdout/stderr? #244

@dagardner-nv

Description

@dagardner-nv

Is your feature request related to a problem? Please describe.
Currently camouflage logs to both camouflage.log and stdout/stderror.

Describe the solution you'd like
Not sure if this is already possible, but I would like to configure these separately. Ideally stderr would only contain logs at the error level, while camouflage.log would contain info and above.

Additional context
Currently I launch camouflage as a sub-process from Python. Since camouflage is left running during the duration of the tests, I redirect stdout/stderr to /dev/null to avoid the possibility of the subprocess PIPE from filling up and blocking.

popen = subprocess.Popen(["camouflage", "--config", "config.yml"],
                            cwd=root_dir,
                            stderr=subprocess.DEVNULL,
                            stdout=subprocess.DEVNULL,
                            preexec_fn=_set_pdeathsig(signal.SIGTERM))

While this works, and I can print the contents of camouflage.log in the event of an error, this fails to cover the cases where camouflage is unable to launch such as not being installed, or the system having some other issue.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions