[logback-user] [Question] fileNamePattern in logback.xml

Seeta Vadali svadali at sdl.com
Mon Sep 10 12:44:03 CEST 2012


Dear Logback team,

 

          First of all I am not very sure is it correct way to ask questions
regarding logback. I couldn't find any forum. I thought of creating bug in
JIRA (http://jira.qos.ch/browse/LOGBACK <http://jira.qos.ch/browse/LOGBACK> )
but I don't have rights .... So I am dropping mail to given mail id... 

 

          Coming to bug : 

          ------------------ 

          I am trying to optimize logback.xml file in our environment.
Logging directory location we are specifying in more than one location so I
am trying to create a variable ( property ) to hold log directory and reuse.
Now problem is if path is "D:\seeta\log" then logback is stripping out all
back ward slashes and giving it as "D:seetalog". I know if I use forward
slash or double slash it works fine but I cannot control the user who use my
tool. Can you please help us in fixing it? 

 

          Working scenario 

          =============

          <configuration>

      ...

      <fileNamePattern>
d:\seeta\log\cd_core.%d{yyyy-MM-dd}.log</fileNamePattern>

      ...

</configuration>

          NON-Working Scenario

          ==============

          <configuration>

...

      <property name="log.dir" value="d:\seeta\log"/>

      ...

 
<fileNamePattern>${log.dir}\cd_core.%d{yyyy-MM-dd}.log</fileNamePattern>

      ...

</configuration>

 

 

 

 

NOTE : I have attached logback.jar and configuration files. Here
{{logback_working.xml}} is existing configuration and trying to modify to {{
logback_NOT_working.xml}}

 

Regards,

Seeta Vadali

 

</pre><font face="arial" size="2" color="#736F6E">



<a href="http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm_campaign=SDL%2BStandard%2BEmail%2BSignature">
<img src="http://www.sdl.com/email.png" border=0><br><br>www.sdl.com
</a><br><br>

<font face="arial" size="1" color="#736F6E">

<b>SDL PLC confidential, all rights reserved.</b>

If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, 
and we further request that you advise us.<BR>
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.<BR>
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
</font>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120910/53350170/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logback_NOT_working.xml
Type: text/xml
Size: 1848 bytes
Desc: logback_NOT_working.xml
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120910/53350170/attachment-0002.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logback_working.xml
Type: text/xml
Size: 1802 bytes
Desc: logback_working.xml
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120910/53350170/attachment-0003.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logback-core.jar
Type: application/octet-stream
Size: 327911 bytes
Desc: logback-core.jar
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120910/53350170/attachment-0001.obj>


More information about the Logback-user mailing list