7.2.3. Log Directory
The content of log files is determined by the configuration of the Logback framework. The platform provides a default configuration file logback.xml
in the classpath root. According to its settings, the log messages will be printed to the standard output.
In order to specify your own logging configuration, provide the logback.configurationFile Java system property with the path to your configuration file. See Setting up Logging in Tomcat for how to do it in case of fast deployment.
The logging configuration determines where the log file is located. It can be a directory inside a specific Tomcat folder (tomcat/logs
in case of fast deployment), or a directory inside the application home. You can control it if you take the logback.xml
from the deploy/tomcat/conf
folder of your project and modify the logDir
property, for example:
<configuration debug="false">
<property name="logDir" value="${app.home}/logs"/>
<!-- ... -->
The application should know where you store log files in order to allow administrators to view and load them in the Administration > Server Log screen. Use the cuba.logDir application property to set the location to the same directory as defined by logback.xml
.
See also Logging.