Ticket #12290: 12290-Bills-instrumentation.patch

File 12290-Bills-instrumentation.patch, 2.8 KB (added by Roger Siddons, 3 years ago)

Logging

  • mythtv/libs/libmythtv/recordingfile.cpp

    From 182567d1def550c8a228adbdff899141bbd80d15 Mon Sep 17 00:00:00 2001
    From: Roger Siddons <rsiddons@mythtv.org>
    Date: Tue, 10 May 2016 17:52:37 +0100
    Subject: [PATCH 1/2] 12290: Bill's instrumentation
    
    
    diff --git a/mythtv/libs/libmythtv/recordingfile.cpp b/mythtv/libs/libmythtv/recordingfile.cpp
    index deefe52..3d3eb30 100644
    a b  
    33
    44#include "mythdbcon.h"
    55#include "mythdb.h"
     6#include "mythlogging.h"
    67
    78RecordingFile::RecordingFile()
    89              : m_recordingId(0), m_storageDeviceID(""), m_storageGroup(""),
    bool RecordingFile::Save() 
    7374    if (m_recordingId == 0)
    7475        return false;
    7576
     77    LOG(VB_RECORD, LOG_INFO, QString("#12290, m_fileSize=%1").arg(m_fileSize));
     78   
    7679    MSqlQuery query(MSqlQuery::InitCon());
    7780
    7881    if (m_fileId > 0)
  • mythtv/libs/libmythtv/tv_rec.cpp

    diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
    index 20e31c1..7fc8632 100644
    a b void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) 
    933933
    934934    // Generate a preview
    935935    uint64_t fsize = curRec->GetFilesize();
     936    LOG(VB_RECORD, LOG_INFO, QString("fsize>=1000 allows previewgen. fsize=%1.").arg(fsize));
    936937    if (curRec->IsLocal() && (fsize >= 1000) &&
    937938        (curRec->GetRecordingStatus() == RecStatus::Recorded))
    938939    {
    void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) 
    957958                     .arg(curRec->GetRecordingEndTime(MythDate::ISODate)));
    958959        gCoreContext->dispatch(me);
    959960    }
    960 
     961    LOG(VB_RECORD, LOG_INFO, QString("After UPDATE_RECORDING_STATUS, fsize=%1.").arg(fsize));
     962   
    961963    // send out REC_FINISHED message
    962964    SendMythSystemRecEvent("REC_FINISHED", curRec);
    963965
    void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) 
    968970        .arg(inputid).arg(secsSince).arg(GetFramesWritten());
    969971    MythEvent me(message);
    970972    gCoreContext->dispatch(me);
    971 
     973    LOG(VB_RECORD, LOG_INFO, QString("After DONE_RECORDING, fsize=%1.").arg(fsize));
     974   
    972975    // Handle JobQueue
    973976    QHash<QString,int>::iterator autoJob =
    974977        autoRunJobs.find(curRec->MakeUniqueKey());
    void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) 
    982985        autoJob = autoRunJobs.find(curRec->MakeUniqueKey());
    983986    }
    984987    LOG(VB_JOBQUEUE, LOG_INFO, QString("AutoRunJobs 0x%1").arg(*autoJob,0,16));
     988    LOG(VB_RECORD, LOG_INFO, QString("fsize<1000 disables commflag/xcode. fsize=%1.").arg(fsize));
    985989    if ((recgrp == "LiveTV") || (fsize < 1000) ||
    986990        (curRec->GetRecordingStatus() != RecStatus::Recorded) ||
    987991        (curRec->GetRecordingStartTime().secsTo(