Hi,

I have been trying to setup a property 'applicationUrl' which can be
evaluated at runtime. I have created the PropertyConfigurer as below:

public class LogbackApplicationURLPropertyDefiner
    extends PropertyDefinerBase {

    public String getPropertyValue() {
        LoggerContext lc = (LoggerContext)
LoggerFactory.getILoggerFactory();
        lc.putProperty();

        return ( UserContext.getUserContext() == null
            ? "User context was null, application url could not be
determined"
            : UserContext.getUserContext().getApplicationUrl() );
    }
}

and in the xml as:

<define name="applicationUrl"
class="com.iblogix.analytic.logging.LogbackApplicationURLPropertyDefiner"/>

But it looks like the value is evaluated only once during the logback
configruation. What I want is that the value be evaluated everytime it is
acessed by someone. Is that possible using what i have right now?

Thanks,
Basu
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to