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

nahuja.iframework.1.2.0.source-code.log4j.xml Maven / Gradle / Ivy

Go to download

This is a set of utilities and classes that I have found useful over the years. In my career spanning over a decade, I have time and again written the same code or some part of the code over and over again. I never found the time to collate the details in a reusable library. This project will be a collection of such files. The work that I have been doing is more than 5 years old, however the project has been conceived in 2011.

There is a newer version: 1.2.1
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <!-- ******************************************************************* -->
  <!-- ConsoleAppender                                                     -->
  <!-- ******************************************************************* -->
  <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
    <param name="Threshold" value="warn"/>

    <layout class="org.apache.log4j.PatternLayout">
      <!-- Conversion pattern: Message\n -->
		<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} [%50c] {%-5p} - %m%n" />
    </layout>
  </appender>

  <!-- ******************************************************************* -->
  <!-- Master Appender - Log all kinds of messages                                                        -->
  <!-- ******************************************************************* -->
  <appender name="MasterAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="framework-messages.log"/>
    <param name="Append" value="false"/>

    <layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} [%50c] {%-5p} - %m%n" />
    </layout>
  </appender>


  <appender name="ErrorMessageAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="framework-error-messages.log"/>
    <param name="Append" value="false"/>

    <layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} {%-5p} - %m%n" />
    </layout>
  </appender>

  <appender name="PerformanceAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="framework-performance-messages.log"/>
    <param name="Append" value="false"/>

    <layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} {%-5p} - %m%n" />
    </layout>
  </appender>

  <appender name="ClientMessageAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="framework-client-messages.log"/>
    <param name="Append" value="false"/>

    <layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} {%-5p} - %m%n" />
    </layout>
  </appender>


  <appender name="DependencyMessageAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="framework-dependencies-messages.log"/>
    <param name="Append" value="false"/>

    <layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} [%50c] {%-5p} - %m%n" />
    </layout>
  </appender>


  <!-- ******************************************************************* -->
  <!-- Low Level Loggers                                                   -->
  <!-- ******************************************************************* -->

	<logger name="org.springframework">
		<level value="debug" />
		<appender-ref ref="DependencyMessageAppender" />
	</logger>

	<logger name="com.kapil.framework">
		<level value="debug" />
		<appender-ref ref="MasterAppender" />
	</logger>

    <logger name="PerformanceAppender">
        <level value="trace" />
		<appender-ref ref="PerformanceAppender" />
    </logger>


  <!-- ******************************************************************* -->
  <!-- Root Logger                                                         -->
  <!-- ******************************************************************* -->
  <!-- Allow warning and higher messages from everyone to go to console and file -->
  <root>
    <level value="error"/>
  </root>

</log4j:configuration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy