|
From: Michael S. <Mic...@ti...> - 2007-07-17 12:30:02
|
>>>>> "Mike" == Mike Schilli <m...@pe...> writes:
Mike> 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.
Mike> The problem is that there are no "unused" appenders at
Mike> init() time. An application acquires loggers at runtime, so
Mike> it could potentially use any of the appenders defined in the
Mike> 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.
Mike> Log4perl creates file appender files at init() time to make
Mike> sure that there's no rude awakening after days/weeks/months
Mike> of operation when some part of the application suddenly
Mike> wants to write to an appender and it can't because of
Mike> permission problems known at init() time.
Mike> This is what most users want. However, thinking about it, we
Mike> could add a "create_at_logtime" option to the file
Mike> appender. Would that help?
Yes, this would be GREAT!
Michael.
|