Added: logging/site/trunk/docs/log4net/release/framework-support.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4net/release/framework-support.html?view=auto&rev=559716 ============================================================================== --- logging/site/trunk/docs/log4net/release/framework-support.html (added) +++ logging/site/trunk/docs/log4net/release/framework-support.html Wed Jul 25 23:41:40 2007 @@ -0,0 +1,755 @@ + + + + + + + + + + + + + + Apache log4net - + Apache log4net: Supported Frameworks + + + + + + + + +
+ +
+
+
+ + + + + + + +

log4net Supported Frameworks

+ + + +

Summary of .NET frameworks supported by log4net

+

+ log4net is built on a number of different frameworks. Each new version of the frameworks add + new features. To take advantage of these new features we must build log4net using the + appropriate framework. We also maintain builds compatible with older versions of the frameworks. +

+

+ It is important to remember that the .NET frameworks support backward compatibility, that is + a new version of the framework will run binary assemblies that were targeted to previous versions + of the framework. +

+

+ While the number of different builds available may seem confusing, you only need to select the + nearest build for your platform that is equal to or earlier than your chosen deployment framework. + If you intend to deploy your application on the Microsoft .NET Framework 1.0 don't pick the + log4net build that is built against the Microsoft .NET Framework 1.1 because the .NET framework + does not guarantee forward compatibility only backward compatibility. +

+

+ The lowest common denominator build is the CLI 1.0 Compatible build. This build is compatible with + the ECMA/ISO CLI 1.0 standard APIs and will run on all frameworks that support the standard. (Note + that the Microsoft .NET Compact Framework does not support this standard). Use this build if you + intend to deploy you application on both the Microsoft .NET Frameworks and the Mono frameworks. +

+

+ log4net now builds on 6 frameworks: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FrameworkWebsite
Microsoft .NET Framework 1.0 (1.0.3705)http://msdn.microsoft.com/net
Microsoft .NET Framework 1.1 (1.1.4322)http://msdn.microsoft.com/net
Microsoft .NET Framework 2.0 (2.0.50727)http://msdn.microsoft.com/net
Microsoft .NET Compact Framework 1.0http://msdn2.microsoft.com/en-us/netframework/aa497273.aspx
Mono 1.2.3http://www.mono-project.com
Microsoft Shared Source CLI 1.0http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp
CLI 1.0 Compatiblehttp://msdn.microsoft.com/net/ecma/
+
+

+ For each of these frameworks a log4net assembly targeting the framework is supplied. Although it's + perfectly possible to use the .NET Framework 1.0 version of log4net on the .NET Framework 1.1, having + an assembly that really targets a specific framework allows us to use features in that framework that + are not available in other frameworks or remove features from log4net that are not supported in a + specific framework. +

+
+ +

Appenders

+

+ The appenders available to each framework depend on the functionality of the + framework and the platform it runs on: +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Appender.NET Framework 1.0.NET Framework 1.1.NET Framework 2.0.NET CF 1.0Mono 1.2Shared Source CLI 1.0CLI 1.0 Compatible
AdoNetAppenderxxxxxx
AnsiColorTerminalAppenderxxxxxxx
AspNetTraceAppenderxxxxx
BufferingForwardingAppenderxxxxxxx
ColoredConsoleAppenderxxx
ConsoleAppenderxxxxxxx
DebugAppenderxxxxxxx
EventLogAppenderxxxxx
FileAppenderxxxxxxx
ForwardingAppenderxxxxxxx
LocalSyslogAppenderxxxxx
MemoryAppenderxxxxxxx
NetSendAppenderxxx
OutputDebugStringAppenderxxxx
RemoteSyslogAppenderxxxxxxx
RemotingAppenderxxxxxx
RollingFileAppenderxxxxxxx
SmtpAppenderxxxxx
SmtpPickupDirAppenderxxxxxxx
TelnetAppenderxxxxxxx
TraceAppenderxxxxxxx
UdpAppenderxxxxxxx
+
+
+ +

Framework Specific Notes

+

Microsoft .NET Framework 1.0 (1.0.3705)

+

+ none +

+
+ +

Microsoft .NET Framework 1.1 (1.1.4322)

+

+ none +

+
+ +

Microsoft .NET Framework 2.0 (2.0.50727)

+

+ none +

+
+ +

Microsoft .NET Compact Framework 1.0

+
    +
  • +

    Assembly attributes

    + + The .NET Compact Framework 1.0 does not support retrieving assembly level + attributes, therefore all log4net configuration attributes were removed from + the .NET Compact Framework 1.0 version of log4net. + +

    + For Smart-device applications, the log4net system can be configured by passing + the location of the log4net configuration file to the + log4net.Config.XmlConfigurator.Configure(FileInfo) + method in the entry point of the application. +

    +

    For example:

    +

    +
    +namespace TestApp
    +{
    +    using System.IO;
    +
    +    public class EntryPoint
    +    {
    +        /// <summary>
    +        /// Application entry point.
    +        /// </summary>
    +        public static void Main() 
    +        {
    +            // Uncomment the next line to enable log4net internal debugging
    +            // log4net.Util.LogLog.InternalDebugging = true;
    +
    +            // This will instruct log4net to look for a configuration file
    +            // called config.log4net in the root directory of the device
    +            log4net.Config.XmlConfigurator.Configure(new FileInfo(@"\config.log4net"));
    +
    +            ...
    +            
    +            // This will shutdown the log4net system
    +            log4net.LogManager.Shutdown();
    +        }
    +    }
    +}                        
    +                            
    +
  • +
  • +

    Notification events

    + + The .NET Compact Framework 1.0 does not support notification events during the + application shutdown, therefore log4net cannot automatically hook the + application shutdown notification. + +

    + Applications will need to programmatically shutdown the log4net system during + the application's shutdown using the + log4net.LogManager.Shutdown() + method in order to prevent losing logging events. + See the code above for an example. +

    +
  • +
  • +

    FileSystemWatcher

    + + The .NET Compact Framework 1.0 does not support the + System.IO.FileSystemWatcher + class. As a result, the + XmlConfiguratorAttribute.Watch + property and the + XmlConfigurator.ConfigureAndWatch + methods are not available. Watching changes to the log4net configuration + file is not supported on the .NET Compact Framework 1.0. + +
  • +
  • +

    UserName

    + + The .NET Compact Framework 1.0 does not support the + System.Security.Principal.WindowsIdentity class. + This is used to capture the current thread's user identity. Therefore + the LoggingEvent.UserName property will return the value + "NOT AVAILABLE". + +
  • +
  • +

    Identity

    + + The .NET Compact Framework 1.0 does not support the + System.Security.Principal.IPrincipal interface. + This is used to capture the current thread's user identity. Therefore + the LoggingEvent.Identity property will return the value + "NOT AVAILABLE". + +
  • +
  • +

    Environment variables

    + + The .NET Compact Framework 1.0 does not support retrieving environment + variables, therefore it's not possible to substitute environment variables in + parameter values when using the .NET Compact Framework 1.0 version of log4net. + +
  • +
  • +

    Serialization

    + + The .NET Compact Framework 1.0 does not support serialization, therefore none of + the log4net classes in the .NET Compact Framework 1.0 version are serializable. + +
  • +
  • +

    LoggingEvent.Domain

    + + The .NET Compact Framework 1.0 does not support AppDomain functionality. The + friendly name for the current AppDomain is stored in the LoggingEvent.Domain + property and is accessed using the %a pattern of the + PatternLayout. On the .NET Compact Framework 1.0 this + value is generated by taking the file name for the application's primary module. + +
  • +
+
+ +

Mono

+

+ There are 2 separate builds of log4net for mono; Mono 1.0, built using the C# compiler in a mode + which is compatible with the CLI 1.0 language specification, and; Mono 2.0, built using the .NET + 2.0 extensions to the C# language. +

+ +

Mono 1.0

+

+ none +

+
+

Mono 2.0

+

+ none +

+
+ +
+ +

Microsoft Shared Source CLI 1.0

+
    +
  • +

    FileSystemWatcher

    + + SSCLI 1.0 does not support the + System.IO.FileSystemWatcher + class. As a result, the + XmlConfiguratorAttribute.Watch + property and the + XmlConfigurator.ConfigureAndWatch + methods are not available. Watching changes to the log4net configuration + file is not supported on SSCLI 1.0. + +
  • +
  • +

    UserName

    + + SSCLI 1.0 does not support the + System.Security.Principal.WindowsIdentity class. + This is used to capture the current thread's user identity. Therefore + the LoggingEvent.UserName property will return the value + "NOT AVAILABLE". + +
  • +
  • +

    Identity

    + + SSCLI 1.0 does not support the + System.Security.Principal.IPrincipal interface. + This is used to capture the current thread's user identity. Therefore + the LoggingEvent.Identity property will return the value + "NOT AVAILABLE". + +
  • +
+
+ +

CLI 1.0 Compatible

+

+ This build of log4net is designed to run on any ECMA CLI 1.0 compatible runtime. + The assembly does not support any platform specific features. The build includes + the common subset of functionality found in the .NET 1.0 and Mono 1.0 builds. + The output assembly is built using the Microsoft .NET 1.0 compiler and library. +

+

+ The log4net CLI 1.0 assembly is runtime compatible with the following frameworks: +

+
    +
  • Microsoft .NET Framework 1.0 (and higher)
  • +
  • Mono 1.0 (and higher)
  • +
+ + Only a Release build is generated for this configuration because the assembly + debugging information has not been standardized. + +
+ +
+ +
+ + + +
+
+
+
+
+ + + Propchange: logging/site/trunk/docs/log4net/release/framework-support.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4net/release/howto/chainsaw.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4net/release/howto/chainsaw.html?view=auto&rev=559716 ============================================================================== --- logging/site/trunk/docs/log4net/release/howto/chainsaw.html (added) +++ logging/site/trunk/docs/log4net/release/howto/chainsaw.html Wed Jul 25 23:41:40 2007 @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + Apache log4net - + Apache log4net: How To view logging events using Apache log4j Chainsaw + + + + + + + + + +
+ +
+
+
+ + + + + + + +

How To view logging events using Apache log4j Chainsaw

+ + +

+ Apache log4j includes Chainsaw + a graphical log viewer. +

+

+ Chainsaw can either receive and display log events in realtime over + the network, or it can load a previously created log file. +

+ +

+ Before Chainsaw can display data, one or more receivers must be setup. + This is usually done by specifying an xml config file when the program + first starts up.

+ Save one or more of the sample xml config files to your local system and + load them when Chainsaw starts. +

+ +

Logging via UDP

+

+ log4net can be configured to log messages via UDP in such a way that Chainsaw + can receive and display them. +

+ +

log4net UDP Configuration

+

+ Configure log4net to use a UdpAppender with the following config snippet: +

+ +
+<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
+    <remoteAddress value="127.0.0.1" />
+    <remotePort value="8080" />
+    <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
+        <locationInfo value="true" />
+    </layout>
+</appender>
+
+ +

Chainsaw UDP receiver Configuration

+

+ Chainsaw should be configured to start a UDPReceiver using the + following configuration document: +

+ +
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> 
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">    
+    <plugin name="UDPReceiver" class="org.apache.log4j.net.UDPReceiver">
+        <param name="Port" value="8080" />
+    </plugin>    
+</log4j:configuration>
+
+ +
+ +

Logging to XML file

+

+ Chainsaw can also load an XML log file if it is formatted according + to the log4j schema. Use the following log4net config to output + to file using the log4j schema: +

+ +
+<appender name="FileAppender" type="log4net.Appender.FileAppender">
+    <file value="log-file.txt" />
+    <appendToFile value="true" />
+    <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
+        <locationInfo value="true" />
+    </layout>
+</appender>
+ +

+ To load the file into Chainsaw drag the file into the Chainsaw + app and drop it on the tab labeled Drag & Drop log files here. +

+
+ +
+ + +
+
+
+
+
+ + + Propchange: logging/site/trunk/docs/log4net/release/howto/chainsaw.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: logging/site/trunk/docs/log4net/release/howto/index.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4net/release/howto/index.html?view=auto&rev=559716 ============================================================================== --- logging/site/trunk/docs/log4net/release/howto/index.html (added) +++ logging/site/trunk/docs/log4net/release/howto/index.html Wed Jul 25 23:41:40 2007 @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + Apache log4net - + Apache log4net: How Tos + + + + + + + + +
+ +
+
+
+ + + + + + + +

log4net How Tos

+ +

+ Below are presented, in no particular order, a series of documents + on how to get stuff done. +

+

+ New documents can be contributed via the issue tracking system. + See the Contributing page for + details. +

+ + + +
+ + +
+
+
+
+
+ + + Propchange: logging/site/trunk/docs/log4net/release/howto/index.html ------------------------------------------------------------------------------ svn:mime-type = text/html