We have Wildfly
running on Domain mode in our production system. There are around 10 web servers and there is only on log file for all 10 servers. The log file is located under /var/log/wildfly/wildfly.log
file. The last time I checked, the files was around 5 GB. My problems are:
Regard
For (1) I'm not sure - is this OS installed? I don't have that file but I just extract the tarball.
For (2) and (3) I think it's a case of looking in domain/configuration/domain.xml
or standalone/configuration/standalone.xml
for the appropriate ("default"?) periodic-rotating-file-handler
and adding, say:
<rotate-size value="20k"/> <!-- Limit on size of file -->
<max-backup-index value="1"/> <!-- Number of log files to keep -->
create size-rotating-file-handler
<size-rotating-file-handler name="FILE_SIZE">
<level name="DEBUG"/>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<rotate-size value="1m"/> <!-- the size, could be 100k, 10m etc-->
<max-backup-index value="5"/> <!-- backup index, default is 1, please set it to a large number -->
<append value="true"/>
</size-rotating-file-handler>
use the handler created
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
<handler name="FILE_SIZE"/> <!-- this is what you need to add -->
</handlers>
</root-logger>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With