2 Replies Latest reply on Nov 10, 2011 10:13 AM by kipper3d

    Controlling log4j filename pattern

    kipper3d

      Hello,

       

      I have been trying to find the right way to handle this change with log4j.

       

      Currently it logs server.log and then when it rolls over at midnight it appends date on the end of that file server.log.date

       

      I've been asked to change this so that it adds the date between server. and log ie: server.date.log

       

      The closed way i've found is the following:

      <param name="File" value="/data/log/server"/>   .log is removed from param name

      <datePattern value="'.'yyyy-MM-dd;.log&quot;" />  added .log here so fills rolled over have .log after the date.

       

      Ok this works, but doesn't seem right  because then its logging to file called server until midnight it becomes server.2011-11-09.log

       

       

      Is there a better way to handle this?

       

      Thanks!

       

      -JKLarsen