Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Write to file using log4j2 without timestamp or classname

I want to write only text to the file. Log4j2 by default writes classname and timestamp as well. Please suggest.

<RollingFile 
    name="FILE" fileName="/logs/app-${date:yyyy-MM-dd'_'HH-mm-ss}.log" 
    filePattern="logs/app-%d{yyyy-MM-dd}-%i.log"
    ignoreExceptions="false">
        <PatternLayout>
            <Pattern>%d{yyyy-MM-dd'_'HH-mm-ss} %p %m%n</Pattern>
        </PatternLayout>
        <TimeBasedTriggeringPolicy />
</RollingFile> 

Comments