On Oct 22, 2008, at 6:43 AM, Chris Kimball wrote:
I'm using a DOMConfigurator successfully in a jar-bundled, cross
platform
app.
But the configuration file is currently a resource within the bundle,
unmodifiable by a user.
I'd like to copy the configuration file out once the app gets
started and
the app knows where to place files, so that the user can set his own
warning
levels, etc.
1. How do I start the app then have the app take it's configuration
file
from an internally calculated area?
Call DOMConfigurator.configure() before any logging request (which
would trigger default configuration) or call LogManager.reset() and
then DOMConfigurator.configure().
2. How do I specify an output file on a cross platform basis? If I
define
the output log file as "log.txt", what directory does it turn up in
under
various systems?
Relative paths would be interpreted relative to the current working
directory. You can use property expressions (see Javadoc for
System.getProperties() for list of predefined properties) like "$
{java.io.tmpdir}/log.txt" if you want to place the log in the
temporary directory or "${user.home}/log.txt" if you want to place in
the user's home directory.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]