Uploaded image for project: 'MediaPortal 1'
  1. MediaPortal 1
  2. MP1-4165

TVService Logging in Separate Files

    XMLWordPrintable

Details

    Description

      <p>Problem:</p><p>At the moment all TVService logging (except errors) is made into one log file (TVService.log) which quickly becomes very big if the TVServer log mode is set to "Debug". So the idea to limit the amout of information that has to be analysed in the case of reported bugs or for debugging is to write the various logging information in separate files, one for the core functions, one for the PS plugin, maybe one for EPG (as it was before the change to the log4net framework), one for xyz...).</p><p>Implementation:</p><p>The log types (loggers) available for logging are (still) hardcoded, but the ones defined (see below) may be used throughout the MP code for logging. Besides the legacy Log.xyz()-Methods (.xyz is .Debug, .Info, .Warn or .Error) there are now <strong>new Log.xyz() methods</strong> which take an <strong>additional LogType parameter</strong>. So e.g. <strong>Log.Debug(LogType.xyz, format, args)</strong> logs to the logger defined by LogType.xyz Log types may be<strong> LogType.Log (default), .Recorder, .Error, .EPG, .VMR9, .Config, .MusicShareWatcher, .WebEPG or .PS</strong>.<br />The actual mapping of loggers, levels etc. and the log files used is controlled by the log4net.config files. The ones provided log everything with level INFO and higher to TvService.log/MediaPortal.log, except Errors which are written to TVService-Error.log/Mediaportal-Error.log and the DEBUG logging of PS, which is written to ps.log. But this may be changed at any time by modifying the config files (e.g. writing the EPG logs to a separate epg.log file).</p>

      Attachments

        Activity

          People

            HomeY HomeY
            michael_t michael_t (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: