logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steck, David" <david.st...@lmco.com>
Subject RE: multi-user logger
Date Wed, 09 Jan 2008 16:03:40 GMT

If the different settings are per module, then you could just configure
the logger for each module, and all user-specific sub-loggers would
inherit those properties.

If it's not that simple, maybe you could use the log4cxx API function
calls in your program to configure your loggers?  That would be more
flexible than the configuration file.

Or, perhaps you could configure a generic logger in the configuration
file, and then a portion of your program would attempt to duplicate that
logger's setting, modifying them as needed.

Just a thought.  If you found a way to solve your problem, let us know
how you did it, in case someone later wants to do something similar.

-David Steck

-----Original Message-----
From: Christoph Macheiner [mailto:Christoph.Macheiner@update.com] 
Sent: Tuesday, December 04, 2007 4:42 PM
To: log4cxx-user@logging.apache.org
Subject: multi-user logger


i am currently trying to incorporate log4cxx into our multi-user
software. basically it is working well, but there is demand for more
extensive configuration (instead of our "fixed" configuration). the wish
is as follows: each user can work with different modules and/or
different logins, and all users/modules are serviced by one single
process (the single user/module per process scenario would of course be
no problem). assume, i want to use loggers named MODULE_NAME.USER_NAME
that should be configured dynamically from a single configuration file
(i use the domconfigurator).

the problem is, for example, with file appenders. there can be hundreds
of user/module combinations, but they can be grouped into a few
different loggers that need to be parametrized at runtime (like filename
should be MODULE_NAME.USER_NAME.log for one group, but only
MODULE_NAME.log for others etc).

the coolest thing would be to have the xml configuration file as a
"template" and create all loggers at runtime from that template xml.
then i could dynamically replace the filenames (etc) and/or reuse
already configured loggers for users of the same group. i cannot really
"hard-configure" all the loggers in the configuration file because, as i
mentioned, there could possibly be hundreds of different files.

so, is there a way to create all my loggers at runtime, from an xml
document provided on the fly? or is there an easier solution...

any help is greatly appreciated (and sorry for the long post). thanks
very much, christoph.

View raw message