G2A Many GEOs
SHARE
TWEET

log4net config with XmlLayoutSchemaLog4j

a guest Mar 10th, 2010 660 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <configuration>
  3.   <configSections>
  4.     <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
  5.   </configSections>
  6.  
  7.   <log4net>
  8.  
  9.     <appender name="OhMyGodItsTheFileAppender" type="log4net.Appender.FileAppender">
  10.       <file value="mylog.txt" />
  11.       <appendToFile value="true" />
  12.       <layout type="log4net.Layout.XmlLayoutSchemaLog4j" >
  13.         <locationInfo value="true" />
  14.       </layout>
  15.     </appender>
  16.  
  17.     <appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
  18.       <mapping>
  19.         <level value="INFO" />
  20.         <foreColor value="Green, HighIntensity" />
  21.       </mapping>
  22.       <mapping>
  23.         <level value="WARN" />
  24.         <foreColor value="Purple, HighIntensity" />
  25.       </mapping>
  26.       <mapping>
  27.         <level value="ERROR" />
  28.         <foreColor value="Red, HighIntensity" />
  29.       </mapping>
  30.       <layout type="log4net.Layout.PatternLayout">
  31.         <conversionPattern value="%date{HH:mm:ss.fff} [%thread] %-5level %logger - %message%newline" />
  32.       </layout>
  33.     </appender>
  34.  
  35.     <root>
  36.       <level value="DEBUG" />
  37.       <appender-ref ref="OhMyGodItsTheFileAppender" />
  38.       <appender-ref ref="ColoredConsoleAppender" />
  39.     </root>
  40.    
  41.     <appender name="HeyLetsGoWithUdp" type="log4net.Appender.UdpAppender">
  42.       <remoteAddress value="localhost" />
  43.       <remotePort value="48899" />
  44.       <layout type="log4net.Layout.XmlLayoutSchemaLog4j" >
  45.         <locationInfo value="true" />
  46.       </layout>
  47.     </appender>
  48.  
  49.  
  50.   </log4net>
  51. </configuration>
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top