config/log4j2-web.xml.template
author Stefan Hühner <stefan.huehner@openbravo.com
Fri, 12 Apr 2019 08:02:03 +0200
changeset 35689 435585a9485d
parent 35030 b58b58de346d
permissions -rw-r--r--
fixes 40598: do not use generics with Object, use instead knwon type
javier@34974
     1
<?xml version="1.0" encoding="UTF-8"?>
javier@35008
     2
<!--
javier@35008
     3
 *************************************************************************
javier@35008
     4
 * The contents of this file are subject to the Openbravo  Public  License
javier@35008
     5
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
javier@35008
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
javier@35008
     7
 * file except in compliance with the License. You  may  obtain  a copy of
javier@35008
     8
 * the License at http://www.openbravo.com/legal/license.html
javier@35008
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
javier@35008
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
javier@35008
    11
 * License for the specific  language  governing  rights  and  limitations
javier@35008
    12
 * under the License.
javier@35008
    13
 * The Original Code is Openbravo ERP.
javier@35008
    14
 * The Initial Developer of the Original Code is Openbravo SLU
javier@35008
    15
 * All portions are Copyright (C) 2018 Openbravo SLU
javier@35008
    16
 * All Rights Reserved.
javier@35008
    17
 * Contributor(s):  ______________________________________.
javier@35008
    18
 ************************************************************************
javier@35008
    19
-->
javier@35022
    20
<!-- Logger configuration used when running as a web application in a container (e.g. Tomcat) -->
javier@35022
    21
<!-- Rebuild tasks executed from Module Management Window uses the build config file (log4j2.xml) -->
javier@35022
    22
<Configuration>
javier@35018
    23
  <Properties>
javier@35022
    24
    <Property name="logDir">${env:CATALINA_BASE}/logs</Property>
javier@35018
    25
  </Properties>
javier@35022
    26
javier@35006
    27
  <Loggers>
javier@35006
    28
    <Root level="info">
javier@35006
    29
      <AppenderRef ref="RollingFile"/>
javier@35006
    30
      <!-- Add this appender to show log messages in console i.e Eclipse: -->
javier@35022
    31
      <!-- <AppenderRef ref="Console"/> -->
javier@35006
    32
    </Root>
javier@35006
    33
javier@35006
    34
    <Logger name="reloadXml" level="error"/>
javier@35006
    35
    <Logger name="org.hibernate" level="error"/>
javier@35006
    36
javier@35006
    37
    <!-- To debug a specific class/package: -->
javier@35022
    38
    <!-- <Logger name="org.openbravo.erpCommon.ad_process" level="debug"/> -->
javier@35006
    39
  </Loggers>
javier@35022
    40
javier@34974
    41
  <Appenders>
javier@35022
    42
    <RollingFile name="RollingFile" fileName="${logDir}/openbravo.log"
javier@35022
    43
                 filePattern="${logDir}/openbravo-%d{yyyyMMdd}-%i.log.gz">
javier@35022
    44
      <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
javier@34986
    45
      <Policies>
javier@35030
    46
        <SizeBasedTriggeringPolicy size="100MB" />
javier@34986
    47
        <TimeBasedTriggeringPolicy />
javier@34986
    48
      </Policies>
javier@35029
    49
      <DefaultRolloverStrategy max="30"/>
javier@34986
    50
    </RollingFile>
javier@35006
    51
javier@35006
    52
    <Console name="Console" target="SYSTEM_OUT">
javier@35027
    53
      <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
javier@35006
    54
    </Console>
javier@34974
    55
  </Appenders>
javier@35018
    56
</Configuration>