Logging Services for .net - log4net
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Logging Services for .net - log4net

on

  • 2,580 views

 

Statistics

Views

Total Views
2,580
Views on SlideShare
2,568
Embed Views
12

Actions

Likes
0
Downloads
33
Comments
0

2 Embeds 12

http://www.slideshare.net 7
http://albert-myptc.blogspot.com 5

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Logging Services for .net - log4net Presentation Transcript

  • 1. Albert Kuo
  • 2.
    • Introduction
    • Features
    • Configuration
      • Import log4net DLL
      • Create config.xml
      • Set Log4Net.xml file path
      • Insert log requests into the application code
    • Reference
  • 3.
    • log4net is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent log4j framework to the .NET runtime.
    • http://logging.apache.org/log4net/index.html
  • 4.
    • Support for multiple frameworks
      • log4net runs on all ECMA CLI 1.0 compatible runtimes. log4net has specific builds for the following frameworks:
        • Microsoft .NET Framework 1.0 (1.0.3705)
        • Microsoft .NET Framework 1.1 (1.1.4322)
        • Microsoft .NET Framework 2.0 (2.0.50727)
        • Microsoft .NET Compact Framework 1.0
        • Mono 1.0
        • Mono 2.0
        • Microsoft Shared Source CLI 1.0
        • CLI 1.0 Compatible
  • 5.
    • Output to multiple logging targets
      • log4net.Appender.AdoNetAppender
        • Writes logging events to a database using either prepared statements or stored procedures.
      • log4net.Appender.ConsoleAppender
        • Writes logging events to the application's Console.
      • log4net.Appender.RollingFileAppender
        • Writes logging events to a file in the file system. The RollingFileAppender can be configured to log to multiple files based upon date or file size constraints.
    • For more information about appenders, please check: http://logging.apache.org/log4net/release/features.html
  • 6.
    • XML Configuration
      • log4net is configured using an XML configuration file. The configuration information can be embedded within other XML configuration files (such as the application's .config file) or in a separate file.
      • The configuration is easily readable and updateable while retaining the flexibility to express all configurations. Alternatively log4net can be configured programmatically.
  • 7.
    • Proven architecture
      • log4net is based on the highly successful log4j logging library, in development since 1996. This popular and proven architecture has so far been ported to 12 languages.
  • 8.
  • 9.
  • 10. Concerning conversationPattern, please check: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
  • 11.
  • 12.
  • 13. Log level
  • 14. ConsoleAppender
  • 15. RollingFileAppender
  • 16.
    • Official site:
      • http://logging.apache.org/log4net/index.html
    • Log4net download url:
      • http://logging.apache.org/log4net/download.html
    • Using log4net:
      • http://ondotnet.com/pub/a/dotnet/2003/06/16/log4net.html