O'Reilly logo

WildFly Cookbook by Luigi Fugaro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a size-rotating file-handler

In this recipe, we will learn how to target the log statement output of your application to a size-rotating-file-handler. It is different from a file-handler in that when the file itself reaches a specific size in terms of bytes, it rolls backing up itself and creates a new file with the same characteristics. This mechanism is, by default, settled to have only one backup file. This is to prevent your hard disks running out of space quickly, in case you forget the setting.

For the sake of simplicity, we will try our recipe with WildFly running in the standalone mode.

Getting ready

If you didn't follow the previous recipe, we will need to create a standalone configuration for our recipe, as follows:

$ cd $WILDFLY_HOME ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required