[mythtv-firehose] mythtv/master commit: 8e3ed0227 by Michael T. Dean (sphery)

MythTV noreply at mythtv.org
Mon Feb 13 05:09:56 UTC 2012


      Author:  Michael T. Dean <mdean at mythtv.org>
 Change Date:  2012-02-12T21:06:51-08:00
   Push Date:  2012/02/12 21:09:42 -0800
  Repository:  mythtv
      Branch:  master
New Revision:  8e3ed022783fbb9b666e8acfd8e7025d89097b7d
   Changeset:  https://github.com/MythTV/mythtv/commit/8e3ed0227

Log:

Add a log message "viewer" service method.

Adds a new service method to allow access to logging data stored to the
database.

In addition, a general-purpose LabelValue data contract is added.  The
LabelValue is used by the log viewer service to pass lists of
label-value pairs and their active/selected state to create the UI for
filtering the log messages.  The LabelValue is generic enough to be used
by other services and may be extended as necessary in the future.

The log viewer service is accessed at:

http://<hostname>:6544/Myth/GetLogs

The service allows filtering using any combination of the twelve
parameters:

HostName - The name of the host on which the application ran
Application - The application name
PID - The process ID of the application
TID - The thread ID (which matches those used by gdb)
Thread - The thread name
Filename - The source code file name containing the code that was
executed
Line - The line number within that source code file
Function - The function name
FromTime - Show only messages on and after FromTime
ToTime - Show only messages on and before ToTime
Level - Show only messages at or below the specified log level name
MsgContains - Show only messages containing the phrase MsgContains

All filtering is done using an and relationship.

Both HostName and Application are required parameters.  Requests lacking
either or both of HostName and Application will receive a response
providing a list of "available" HostName and Application values.

Examples include:

To show log messages from mythbackend running on the host mbe:
 http://<hostname>:6544/Myth/GetLogs?HostName=mbe&Application=mythbackend

To show log messages from mythbackend running on the host mbe starting
at 2011-12-15T16:52:04 (UTC):
http://<hostname>:6544/Myth/GetLogs?HostName=mbe&Application=mythbackend&FromTime=2011-12-15T16:52:04

To show log messages from mythbackend running on the host mbe between
2011-12-15T16:52:04 and 2011-12-15T20:30:59:
http://<hostname>:6544/Myth/GetLogs?HostName=mbe&Application=mythbackend&FromTime=2011-12-15T16:52:04&ToTime=2011-12-15T20:30:59

To show critical log messages from mythfrontend running on the host fe:
 http://<hostname>:6544/Myth/GetLogs?HostName=fe&Application=mythfrontend&Level=crit

Added:

   mythtv/libs/libmythservicecontracts/datacontracts/labelValue.h
   mythtv/libs/libmythservicecontracts/datacontracts/logMessage.h
   mythtv/libs/libmythservicecontracts/datacontracts/logMessageList.h

Modified:

   mythtv/libs/libmythservicecontracts/libmythservicecontracts.pro
   mythtv/libs/libmythservicecontracts/services/mythServices.h
   mythtv/programs/mythbackend/services/myth.cpp
   mythtv/programs/mythbackend/services/myth.h



More information about the mythtv-firehose mailing list