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

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
dyre
Registered Member
Posts: 2
Joined: Mon Jun 28, 2021 9:32 am

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

Post by dyre » Mon Jun 28, 2021 9:41 am

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

Code: Select all

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?

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

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

Post by andrew » Mon Jun 28, 2021 9:47 am

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

Example:

Code: Select all

./dwginfo .... 2>/dev/null | grep -v "QCAD Version"
Note that is is standard Posix and has nothing to do with QCAD command line tools.

dyre
Registered Member
Posts: 2
Joined: Mon Jun 28, 2021 9:32 am

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

Post by dyre » Mon Jun 28, 2021 10:01 am

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:)

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

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

Post by andrew » Mon Jun 28, 2021 10:09 am

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

Post Reply

Return to “QCAD 'How Do I' Questions”