ranjisona
(Ranjisona)
#1
After deploy war file in Production,below log file is generated in DEBUG Mode and I want to remove DEBUG Mode to Production Mode.
2018-08-14 11:01:24.863 DEBUG [http-nio-8080-exec-556/worklog-core/useractivitycollector] com.haulmont.cuba.core.app.RdbmsStore - load: metaClass=worklog$WorkLog, id=e7ea2e67-b8d1-ff6d-2521-8ed5165ad821, view=com.vee.worklog.entity.logs.WorkLog/
2018-08-14 11:01:24.867 DEBUG [http-nio-8080-exec-556/worklog-core/useractivitycollector] com.haulmont.cuba.core.app.RdbmsStore - commit: commitInstances=[com.vee.worklog.entity.logs.WorkLog-e7ea2e67-b8d1-ff6d-2521-8ed5165ad821 [new]], removeInstances=[]
artamonov
(Yuriy Artamonov)
#2
You should include custom logback.xml
file into your WAR: buildWar - CUBA Platform. Developer’s Manual
Modify your build.gradle
:
task buildWar(type: CubaWarBuilding) {
logbackConfigurationFile = "/modules/global/src/logback.xml"
}
Create /modules/global/src/logback.xml
file and set up logging there. The easiest way to set up this - using Studio Deployment Settings
:

Then set level INFO to appender RollingFileAppender
in logback.xml
file:
<configuration debug="false" packagingData="true">
...
<appender name="File" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDir}/app.log</file>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
...