On Fri, 13 Jul 2007, Michael Schmitz wrote:

> This is in fact a drastic approach. As regards problems that prevent
> proper logging, I agree with you, but this is not the case for me.
>
> Different application running with different privileges share a common
> configuration file. It would be a problem if an unprivileged
> application uses a logger that logs to a file the user cannot write
> to, but this is not the case. As long as the application attempts to
> use the correct logger (which is the case), ie. the one it is meant to
> use, and this logger is associated with a file the unprivileged user
> can write to, it is fine from my point of view.

The problem is that there are no "unused" appenders at init() time. An
application acquires loggers at runtime, so it could potentially use any
of the appenders defined in the configuration file.

> If log4perl would check for the appropriate permission when an
> application creates the logger, it could (and it should) let the user
> know. Checking in the initialization phase anticipates problems that
> may not even occur.

Log4perl creates file appender files at init() time to make sure that
there's no rude awakening after days/weeks/months of operation when some
part of the application suddenly wants to write to an appender and it
can't because of permission problems known at init() time.

This is what most users want. However, thinking about it, we could add
a "create_at_logtime" option to the file appender. Would that help?

-- Mike

Mike Schilli
[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to