On Sat, 22 Jun 2013 12:38:40 +0200, Marvin B. Lillehaug
<[email protected]> wrote:
Hi,
I'm trying to convert my xml configuration to groovy, and are having
some problems.
When using xml I defined a variable ${logdir} where the logs should end
up.
In the xml config I just added logdir as a property in the
LoggerContext, and reconfigured the context. and it worked.
However it seems that these properties are not made available to the
config script. The only variable made available is ${hostname}
(GafferConfigurator.run(..)).
The way I am configuring with groovy is:
ContextInitializer contextInitializer = new
ContextInitializer(loggerContext);
contextInitializer.configureByResource(configFile);
Is there som other way I should do this, or do I have to do some magic
to get my variable?
I found out that the magic I had to perform was «def loggingDirectory =
context.getProperty('logdir')»
--
Mvh,
Marvin B. Lillehaug
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user