cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Log file customization to write only in the generated file instead of writing it in catalina.out

Former Member
0 Likes
412

I have added the below appender in logback.xml. This is writting the datahub logs into both catalina.out and datahub.log files. Is there any way to make it write only in datahub,log.

     <file>../logs/datahub_${byDate}.log</file>
     <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
         <fileNamePattern>../logs/datahub_%d{yyyy-MM-dd}.%i.log</fileNamePattern>

         <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
             <maxFileSize>500MB</maxFileSize>
         </timeBasedFileNamingAndTriggeringPolicy>
     </rollingPolicy>
     <encoder>
         <Pattern>%d [%-5level][%t][%c] %m%n</Pattern>
     </encoder>
 </appender>

Accepted Solutions (0)

Answers (0)