Display Statistics

From Xibo

Jump to: navigation, search

Contents

XMDS

XMDS will need to be changed to support the separation of the LOG calls and the STAT calls. This will in turn facilitate the extension of the stats interface for extra stats.

Summary The RecieveXMLLog method should be separated into 2 parts

  • SubmitLog
  • SubmitStats

SubmitStats

Will take 3 parameters

  • StatXml
  • serverKey
  • HardwareKey
  • SchemaVersion

The XML that is submitted should be single nodes conforming to the following specification

<stat type="layout" fromdt="ISO date" todt="ISO date" layoutid="" scheduleid=""></stat>
<stat type="media" fromdt="ISO date" todt="ISO date" layoutid="" mediaid=""></stat>
<stat type="event" fromdt="ISO date" todt="ISO date" tag=""></stat>

SubmitLog

Simplify the current XML format so that the entire message is contained on one node (without sub nodes).

<trace date="ISO date" category="error|warning|info|audit">
 <message>
  Message text
 </message>
 <scheduleid/>
 <layoutid/>
 <mediaid/>
 <method/>
</trace>

eg:

<trace date="2009-08-01 03:01:00" category="error">
 <message>
  Unable to download media.
 </message>
 <scheduleid>6</scheduleid>
 <layoutid>98</layoutid>
 <mediaid>7</mediaid>
 <method>GetFile</method>
</trace>

.NET Client

XML Log

The Trace logging in the .NET Client is implemented using the System.Diagnostics name space. With Trace being used for Error and Informational logging and Debug being using for auditing.

The log messages will be in XML format and have a category associated with them. The category can be Error|Audit|Info. The default is Audit.

The release client will be the "Release Build" and only contain Trace logging.

The XiboTraceListener will keep a collection of trace messages and be set to AutoFlush = false. A manual flush will occur after every XMDS call and also just before the application terminates (in Main).

The TraceListener will check the last time XMDS was successfully contacted and if it is within a reasonable time frame it will send the log to XMDS. If the log fails, or is not in a reasonable time frame then the log will be flushed to file.

Stats Log

Stats will be collected for Schedule, Layouts and Media items. A stats collection will be kept and passed around by reference. Each layout and media is responsible for recording its own stats.

They are sent to XMDS or to file using the same logic as the XML log.

Reporting

Stats will be made available through the Xibo admin interface.

They will be:

  • Viewable in the interface (in 1.1 series)
  • Available via CSV

A reporting range will have to be selected.