AMQ 7 running on Linux Current default configuration:
handler.FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
handler.FILE.level=DEBUG
handler.FILE.properties=suffix,append,autoFlush,fileName
handler.FILE.suffix=.yyyy-MM-dd
handler.FILE.append=true
handler.FILE.autoFlush=true
handler.FILE.fileName=${artemis.instance}/log/artemis.log
handler.FILE.formatter=PATTERN
Attempted to convert to:
handler.FILE=org.jboss.logmanager.handlers.SizeRotatingFileHandler
handler.FILE.level=DEBUG
handler.FILE.formatter=PATTERN
handler.FILE.properties=append,autoFlush,enabled,maxBackupIndex,rotateOnBoot,rotateSize,fileName
handler.FILE.append=true
handler.FILE.autoFlush=true
handler.FILE.enabled=true
handler.FILE.maxBackupIndex=2
handler.FILE.rotateOnBoot=true
handler.FILE.rotateSize=5K
handler.FILE.fileName=${artemis.instance}/log/artemis.log
Results in no log file being created.
Verified jboss-logmanager-2.0.7.Final-redhat-1.jar contains
6196 Defl:N 2786 55% 07-25-2017 04:59 16cae5b1 org/jboss/logmanager/handlers/SizeRotatingFileHandler.class
When I use the configuration you specified I get this exception when I start the broker:
The problem is this line of your configuration:
The code expects a valid Java
long
value which represents the number of bytes which are written to the file before rotating.5K
translates into5120
(5 * 1024). When I used this value everything worked as expected.