[debpool] Logging and error handling

Andreas Fester Andreas.Fester at gmx.de
Sun Apr 15 20:35:10 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> - This leads to my second question :) for the logging stuff,
>>   it might make sense to use the already existing log4perl module
>>   (liblog-log4perl-perl). I have not yet looked into it how
>>   complete it is compared to log4j, but it might be worth checking it.
> 
> Please do so if you want to. Can it log to syslog as well?

It can, through the Log::Dispatch module (also includes logging
to Email, File, Console).
There is one drawback: liblog-dispatch-perl pulls in the package
libparams-validate-perl, which is arch-dependent :-(
IIUC, this would inhibit the "self-contained" approach...

I think it would be best to create a simple logging
interface containing a "getLogger" function and a Logger
object containing debug, info, error, warning functions; these
can then be used from the application, and they encapsulate
the logging backend.

Best Regards,

	Andreas

- --
Andreas Fester
mailto:andreas at littletux.net
WWW: http://www.littletux.net
ICQ: 326674288
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGIox+Z3bQVzeW+rsRAqv0AKCF6WuDgQm7Os/PiHcr/9H6eLv0egCfbiwt
KwcS1tj4T5dX2xy6X+bOFSg=
=T6Id
-----END PGP SIGNATURE-----



More information about the Debpool-devel mailing list