On Aug 1, 2007, at 2:10 AM, Michael Schmitz wrote:
I disussed almost the same issue with the log4perl guys as the problem
Christian described is actually a major problem in our project. I
think it would be a great idea to permit specification of the file
mode via the configuration.
I asked for comments on log4net-dev (http://marc.info/?l=log4net-
dev&m=118598739032116&w=2) and didn't get much insight beyond don't
have multiple processes hit the same log file (which is a good and
true statement). log4net has the idea of a nested securityContext
where you can specify that logging would be done as a particular user
(which would be one way around the file permissions issue), but I
have no direct experience with it.
Is there an archive of your discussion with log4perl?
Since umask and chmod both seem to be provided as standard PHP
library functions, then it seems that PHP is responsible for
emulating or stubbing them on Windows or other platforms with
different file permission models.
I would suggest that if the user does not specify a umask or chmod
value, then umask or chmod not be called. Looking at the original
patch, it seemed like it did not have a concept of an unspecified
umask. Since both umask and chmod have warnings, I'd suggest
implementing them both and the user is responsible for making the
right choice (and if they specified neither than neither function is
called).