How do I disble the debug logs produced by the CLI?

For the dwginfo cli-tool, running on ubuntu 16.04, I always get the following output in stdout

QCAD version  3.26.4
10:22:07: Debug:    Input file:  <PATH_TO_INPUT_FILE>
10:22:07: Debug:    calling odInitialize
10:22:07: Debug:    ...
10:22:07: Debug:    ...
10:22:07: Debug:    ...

How do I disable the debug logs and possibly the first line with the qcad version information?

You can redirect stderr to ignore debugging output. Use grep to skip the version.

Example:

./dwginfo .... 2>/dev/null | grep -v "QCAD Version"

Note that is is standard Posix and has nothing to do with QCAD command line tools.

I am running “dwginfo -l” to list all layers. So I’ll cross my fingers that no layers is named “QCAD Version” for this grep filter:)

Feel free to use tail to simply skip the first line instead :slight_smile:

Hi,
When I try the ./dwginfo .... 2>/dev/null command all output is redirected to /dev/null, not only the debug lines.

QCAD version 3.32.5.1
Ubuntu 24.04

I’m using the snapshot version because I’m running on Arm64. Could it be that the snapshot version is sending all output to stderr?

Thanks in advance,

Diggie

Hi,
I can confirm that the current Qt 6 builds, including snapshots are printing all output to stderr. This will be fixed in the next (snapshot) release.