Seitenhierarchie

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Overview

MediaPortal uses log4net for logging.

log4net logging has elements that can be configured, specifically the log file size and log rotation. The default values are 1 MB log files, and 5 logs are retained.

  • We have the same logging format in all parts of MediaPortal
  • The TVplugin is logging into
    MediaPortal.log
  • Log files is named after the running program (
    MediaPortal.exe
    MediaPortal.log
    )
  • Errors are logged in
    MediaPortal-Error.log

Any request for support, or bug report requires log files. See Tester's Guide for further information.

Configuration

To configure the log4net settings, open the following file with a text editor:

C:\ProgramData\Team MediaPortal\MediaPortal\log4net.config

It is possible to configure the maximum log file size and amount by altering the

maximumFileSize

and

maxSizeRollBackups 

values in the

DefaultLogAppender

and

ErrorLogAppender

sections.

How to collect and attach log files to a support thread

See Log Files for a detailed description of how to get the best support.

Example log4net.config

<appender name="DefaultLogAppender" type="log4net.Appender.RollingFileAppender">
      <file value="[Name].log" />
      <appendToFile value="true" />
      <rollingStyle value="Once" />
      <maxSizeRollBackups value="5" />
      <maximumFileSize value="1MB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="[%date] [%-7logger] [%-9thread] [%-5level] - %message%newline" />
      </layout>
    </appender>

    <appender name="ErrorLogAppender" type="log4net.Appender.RollingFileAppender">
      <file value="[Name]-Error.log" />
      <appendToFile value="true" />
      <rollingStyle value="Once" />
      <maxSizeRollBackups value="5" />
      <maximumFileSize value="1MB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="[%date] [%-7logger] [%-9thread] [%-5level] - %message%newline" />
      </layout>
    </appender>

Technology

log4net is designed with two distinct goals in mind: speed and flexibility. The log4net package is designed so that log statements can remain in shipped code without incurring a high performance cost.

log4net can monitor its configuration file for changes and dynamically apply changes made by the configurator.

Background and History

The log4net project was started by Neoworks Limited in June 2001. It was created as an internal project within Neoworks to port the Apache log4j™ code base to the Microsoft® .NET Framework. The code base was initially branched from a pre-alpha log4j 1.2.

In July 2001 a Sourceforge project was started and log4net was published under the Apache Software License.

In December 2003 the Apache Logging Services project was created. In February 2004 log4net was donated by Neoworks to the Apache Software Foundation to become a member of the Logging Services project.

In February 2007 log4net graduated from the Apache Incubator project to become a fully fledged Apache project. Apache log4net is a subproject of the Logging Services project.

   

 

This page has no comments.