A file is not a good target for multiple users or threads, unless you have some type of service in front of it. If you do, you have a database server.
To be rhetorical: Is building this type of architecture (basically, the IO handling of a DB server) into fileappender in scope of the apache logger? Workaround: If you have a highly concurrent, multiple user scenario, just target something that can safely handle multiple threads and users. E.g. a database via ADOAppender. I started there, and never looked back. I use the console / file appenders during unit tests I understand the overhead of database deployment could be an issue in some cases - people want to use a file as a target because the file system is always there. To meet this need, maybe someone has a demo of some really lightweight / easy configuration that targets something designed for multiple users (doesn't require a database server?) On 8/1/07, Curt Arnold <[EMAIL PROTECTED]> wrote: > > There has been a thread on log4php-dev (http://marc.info/?l=log4php- > dev&m=118520958818276&w=2) that I'd like to get an opinion from the > log4net developers. Basically, the user wishes to allow multiple > user accounts to be able to write to the same log file and they are > being prevented since the default file permissions set when the first > user creates the log file prevents the second user from writing to > it. The request was to add a umask or chmod configuration option to > FileAppender. > > Aside from the point, that simultaneous access to a common log file > is unsupported and unreliable in log4j and log4cxx (can't speak for > log4net and log4php), are there any facilities in log4net for > controlling the file permissions. I didn't see any from reviewing > the log4net code, but I assume that one solution would be to specify > a <securityContext> for the FileAppender to use a common user. > > If you have any comments or advice, either post here or better yet, > subscribe to the low-volume log4php-dev mailing list (log4php-dev- > [EMAIL PROTECTED]) and post there. >
