Ignore:
Timestamp:
06/13/11 18:07:08 (13 years ago)
Author:
tbretz
Message:
Improved some logging output; added some debug output for each report; fixed the check to which files the service should go.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/dataLogger.cc

    r10997 r11016  
    513513    if (isCmd)
    514514        return;
     515
    515516    if (fServiceSubscriptions[server].erase(service) != 1)
    516517    {
     518        //check the given subscription against black and white lists
     519        if (!ShouldSubscribe(server, service))
     520            return;
     521
    517522        ostringstream str;
    518         str << "Subscription " << server << "/" << service << "could not be removed as it is not present";
     523        str << "Subscription " << server << "/" << service << " could not be removed as it is not present";
    519524        Error(str.str());
    520525        return;
     
    612617        Debug(str);
    613618    }
    614     return new DimStampedInfo((server + "/" + service).c_str(), const_cast<char*>(""), this);
     619    return new DimStampedInfo((server + "/" + service).c_str(), (void*)NULL, 0, this);
    615620}
    616621// --------------------------------------------------------------------------
     
    11531158        return;
    11541159    }
    1155     if (I->getSize() <= 0)
     1160    if (I->getSize() <= 0 || I->getData()==NULL)
    11561161        return;
    11571162
     
    13011306void DataLogger::ReportPlease(DimInfo* I, SubscriptionType& sub)
    13021307{
    1303 
    1304 
    1305     //should we log or report this info ? (i.e. is it a message ?)
    1306     bool isItaReport = ((strstr(I->getName(), "Message") == NULL) && (strstr(I->getName(), "MESSAGE") == NULL));
    1307     if (I->getFormat()[0] == 'C')
    1308         isItaReport = false;
     1308    const string fmt(I->getFormat());
     1309
     1310    const bool isItaReport = fmt!="C";
    13091311
    13101312    if (!fNightlyReportFile.is_open())
    13111313        return;
     1314
     1315    if (fDebugIsOn && string(I->getName())!="DATA_LOGGER/MESSAGE")
     1316    {
     1317        ostringstream str;
     1318        str << "Logging " <<  I->getName() << " [" << I->getFormat() << "] (" << I->getSize() << ")";
     1319        Debug(str);
     1320    }
    13121321
    13131322    //Check whether we should close and reopen daily text files or not
     
    18061815
    18071816        str.str("");
    1808         str << "Num subs: " << fNumSubAndFitsData.numSubscriptions << " Num open FITS: " << fNumSubAndFitsData.numOpenFits;
     1817        str << "Num subscriptions: " << fNumSubAndFitsData.numSubscriptions << " Num open FITS files: " << fNumSubAndFitsData.numOpenFits;
    18091818        Debug(str);
    18101819    }
Note: See TracChangeset for help on using the changeset viewer.