New driver development help - Okimate 20

Kurt Pfeifle k1pfeifle at gmx.net
Fri Nov 16 12:25:08 PST 2007


Sean M. Pappalardo wrote:

> 4) How can I insert debugging text to display on STDERR or in a log 
> or something? 

See "man filter".

Whatever your rastertookimate filter spits out to STDERR ends up in the
CUPS error_log file *IF* one of the following keywords/strings appears
at the beginning of each line:

 ALERT:
 CRIT:
 DEBUG:
 DEBUG2:
 EMERG:
 ERROR:
 INFO:
 NOTICE:
 WARNING:

Messages will end up in error_log if "LogLevel ..." matches the respec-
tive keyword (used lower-cased) in cupsd.conf (or worse). Since the de-
fault setting is "LogLevel info", a line like

INFO: this is a test message from my rastertookimate filter

directed to STDERR will make its appearance in your error_log (in "debug"
or "debug2" LogLevel all "info" level messages will also be present).
The lines in error_log will have as first character an "I", "d", "D", "A",
"N", "W", "e", "E" or "C" to show which log level that message is from.
That makes it easy to grep for "^E" to see the real errors amongst all
the "^I" lines...

-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  ...........................  Kesselstrasse 19
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list