Forum How do I...?

Can I suppress warnings in CLI?

Marcel
Hey,

I get a warning on STDERR, which makes me stop the program:

Prince child process failed for /tmp/a28b6/a28b6-2_009_01_BB_270_printPage_2.svg: prince: image.svg: warning: unsupported properties: enable-background

The warning is ok, but I just need a way to skip it as a warning. As I understood --silent shuts down errors as well?

Any possibility to just skip warnings?

Thx
Marcel
mikeday
We are planning to add an option to suppress warnings about CSS properties.
Marcel
perfect! I just look for the string "warning" in STDERR in the meantime as a workaround. Thx
mikeday
We have released an updated latest build that includes a new option --no-warn-css-properties which will disable warnings for unknown and unsupported CSS properties.
Marcel
Thx! Love your speed for small improvements! Keep on the good work!
mikeday
Now in our latest latest build the --no-warn-css-properties command-line option has been replaced with three new options:

--no-warn-css
--no-warn-css-unknown
--no-warn-css-unsupported

So you can customise whether you wish to suppress warnings for unknown syntax, unsupported syntax, or everything.
Marcel
Thx for the update.

As an addition wouldn't it be better to send warnings to stdout instead of stderr - as it isn't an error?
mikeday
In many cases the PDF itself is written to stdout, so all log messages go to stderr for convenient redirection.