All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bozonky.robozonky-cli.6.4.0-cr-1.source-code.log4j2.xml Maven / Gradle / Ivy

There is a newer version: 6.4.1
Show newest version
<!--
  ~ Copyright 2019 The RoboZonky Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<Configuration status="WARN" monitorInterval="30" shutdownHook="disable">

  <Properties> <!-- These are the common pattern layouts to be used later in the file. -->
    <Property name="consoleAppenderPatternLayout">%d{HH:mm:ss.SSS} %-5level %msg%n</Property>
    <Property name=   "fileAppenderPatternLayout">%d{HH:mm:ss.SSS} %-5level [%t] %logger{-36} - %msg%n</Property>
  </Properties>

  <Appenders>
    <Console name="STDOUT" target="SYSTEM_OUT">
      <Filters>
        <ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
        <ThresholdFilter level="info"  onMatch="ACCEPT" onMismatch="DENY"/>
      </Filters>
      <PatternLayout pattern="${consoleAppenderPatternLayout}"/>
    </Console>
    <Console name="STDERR" target="SYSTEM_ERR">
      <!-- Only send error and fatal messages. -->
      <ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
      <PatternLayout pattern="${consoleAppenderPatternLayout}"/>
    </Console>
    <!-- Log everything to robozonky.log file. Roll the file every day, compress the results. -->
    <RollingRandomAccessFile
            immediateFlush="false"
            append="false"
            name="DEBUG"
            fileName="robozonky.log"
            filePattern="robozonky.%d{yyyyMMdd}.log.gz">
      <PatternLayout pattern="${fileAppenderPatternLayout}" />
      <Policies>
        <TimeBasedTriggeringPolicy />
      </Policies>
      <DefaultRolloverStrategy max="100">
        <!-- Delete only files older than 7 days. -->
        <Delete basePath="." maxDepth="1">
          <IfFileName glob="robozonky*log*">
            <IfLastModified age="7d" />
          </IfFileName>
        </Delete>
      </DefaultRolloverStrategy>
    </RollingRandomAccessFile>
  </Appenders>
  <Loggers>
    <Root level="info">
      <AppenderRef ref="STDOUT"/> <!-- Infos go to the standard output. -->
      <AppenderRef ref="STDERR"/> <!-- Errors and warnings go to the standard error output. -->
      <AppenderRef ref="DEBUG"/>  <!-- All RoboZonky logging goes into a single file. -->
    </Root>

    <Logger name="com.github.robozonky" level="debug" /> <!-- change "debug" to "trace" for more detailed logging -->
    <!-- kill various unavoidable messages -->
    <Logger name="javax.mail" level="error" />
    <Logger name="org.apache.http" level="warn" />
    <Logger name="org.jboss.resteasy" level="warn" />
  </Loggers>
</Configuration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy