Hello all,

I have written a patch that simplifies output handling for all the
clamav programs - it moves most of the logic of how to handle output
into the logg() function, and changes all of the programs to use logg()
instead of the many functions they currently use (mdprintf, mprintf,
printf, cli_*msg, etc).  It shortens the code base by several hundred
lines, and I believe it does so with no loss of functionality.

The reason for this patch is that I recently noticed that several
programs were using the cli_*msg calls to write warnings, even when
daemonized.  Also, syslog vs. LogFile was handled differently across
programs.  This means that I was not seeing potentially important
information in the logs of my headless servers across town.  This patch
will (hopefully) allow all information to go to whatever logfile it
should, while still letting programs that write to stdout/stderr to do
so without any problems.

The usual disclaimers apply - it is a large patch, so I assume I have
missed something.  I have a feeling that in particualr, clamav-milter
will need some looking over to make sure I have done nothing seriously
wrong there.

The patch can be found at
http://lobefin.net/~steve/clamav-output-patch-round2.gz
It is about 35K zipped, so I didn't want to just send it to the list.

Thanks all,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Do you realize how many holes there     |
|  [EMAIL PROTECTED]             | could be if people would just take the  |
|  http://www.lobefin.net/~steve | time to take the dirt out of them?      |
 --------------------------------------------------------------------------

Attachment: pgp7qVm0YOdZH.pgp
Description: PGP signature

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html

Reply via email to