Hi,<br><br>I am having difficulty in defining the web app name property. I think I am doing some thing wrong when specifying the value for property name from the class implementing the PropertyDefiner interface. My configuration for property definition looks like:<br>
<br><i>&lt;define name=&quot;WEBAPP&quot; class=&quot;org.akaza.openclinica.control.WebAppNamePropertyDefiner&quot;&gt;<br>    &lt;aProperty&gt;webAppProperty&lt;/aProperty&gt;<br> &lt;/define&gt;</i><br><br>and the class implementing PropertyDefiner interface looks like:<br>
<br><i>import ch.qos.logback.core.PropertyDefinerBase;<br>/**<br> * @author pgawade Class defined to return the web application name<br> */<br>public class WebAppNamePropertyDefiner extends PropertyDefinerBase {<br><br>    static String webAppProperty;<br>
<br>    public WebAppNamePropertyDefiner() {<br>        // super();<br>    }<br><br>    public WebAppNamePropertyDefiner(String webAppName) {<br>        if (webAppProperty == null) {<br>            webAppProperty = webAppName;<br>
        }<br>    }<br><br>    public String getPropertyValue() {<br>        return webAppProperty;<br>    }<br>}</i><br><br>I am not clear about what should me mentioned for element &lt;aProperty&gt;. Or it should element name be actual property name? I did not get any example of this on internet. Any inputs?<br>
Is it possible to define multiple properties in the same class <i>WebAppNamePropertyDefiner  </i>or there needs to be one class per property definition?<br><br>On a side note, I realized that probably I can put the web application name in MDC context and use that variable in the configuration.<br>
<br>Thanks,<br>Pradnya<br><br><br><br><br><br><div class="gmail_quote">On Mon, Nov 22, 2010 at 1:22 PM, Pradnya Gawade <span dir="ltr">&lt;<a href="mailto:pradnya.gawade7@gmail.com">pradnya.gawade7@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thank you. Yes, I was looking for some thing like this. <br><font color="#888888"><br>- Pradnya</font><div>
<div></div><div class="h5"><br><br><br><br><br><div class="gmail_quote">On Mon, Nov 22, 2010 at 12:38 PM, Ceki Gulcu <span dir="ltr">&lt;<a href="mailto:ceki@qos.ch" target="_blank">ceki@qos.ch</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Yes, you can define properties dynamically. See<br>
<a href="http://logback.qos.ch/manual/configuration.html#definingPropsOnTheFly" target="_blank">http://logback.qos.ch/manual/configuration.html#definingPropsOnTheFly</a><div><div></div><div><br>
<br>
<br>
On 22.11.2010 16:39, Pradnya Gawade wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
Can I use my Spring web application name in the logback configuration<br>
dynamically? I know logback can read from properties file specified<br>
under &lt;property&gt; or it can read from the system variables but is it<br>
possible to use some dynamic data like web application name in the<br>
configuration?<br>
<br>
Thanks,<br>
Pradnya<br>
</blockquote>
<br></div></div>
_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>