Reputation: 11
I am using Wildfly 10 (JBOSS) server. This is the my log rotation configuration in my server environment.
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
A log file (server.log.2018-mm-dd) is getting created daily with the above configuration. but the size of this file is very huge around 1.5 to 2gb. so i want to get a tar file created instead of direct file. what to add in the above configuration to get a zipped file created ?
Upvotes: 0
Views: 2032
Reputation: 17780
That functionality isn't available in WildFly 10 by default unfortunately. You could replace the org.jboss.logmanager
module with 2.1.2.Final which contains an enhancement for this.
The only other option would be to add a cronjob or something similar to execute when the log is rotated.
Upvotes: 0