You can set application/system properties on Wildfly 10 (it should be the same with previous version of Wildfly). In this particular case we will set the property for the folder that will be used by logback to save logs.

Below is the logback configuration.

We need to set the application variable application.logs.dir so that logback can use the correct folder. To achieve this we add the system-properties in the configuration file, in our case standalone.xml. This should be immediately after the extension tag.

Don’t forget to restart the application server for the changes to take effect.