Changeset 14172 for trunk/FACT++


Ignore:
Timestamp:
06/13/12 15:34:32 (12 years ago)
Author:
lyard
Message:
fixed quality bug in datalogger
File:
1 edited

Legend:

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

    r14009 r14172  
    12711271    const Time cTime(I->getTimestamp(), I->getTimestampMillisecs()*1000);
    12721272    fQuality = I->getQuality();
     1273    //I had strange surprises with the quality from Dim before. Double check that the value is indeed valid.
     1274    if (fQuality != kMessage &&
     1275        fQuality != kInfo &&
     1276        fQuality != kWarn &&
     1277        fQuality != kError &&
     1278        fQuality != kFatal &&
     1279        fQuality != kComment &&
     1280        fQuality != kDebug)
     1281        fQuality = kError;
    12731282    fMjD = cTime.Mjd() ? cTime.Mjd()-40587 : 0;
    12741283
     
    14111420        if (fNightlyLogFile.is_open())
    14121421        {
    1413             MessageImp(fNightlyLogFile).Write(cTime, msg.str().c_str(), kMessage);//fQuality); Silently ignore QoS in case of messages
     1422            MessageImp(fNightlyLogFile).Write(cTime, msg.str().c_str(), fQuality);
    14141423            if (!CheckForOfstreamError(fNightlyLogFile, true))
    14151424                return;
     
    14171426        if (targetRunFile && targetRunFile->is_open())
    14181427        {
    1419             MessageImp(*targetRunFile).Write(cTime, msg.str().c_str(),  kMessage);//fQuality);
     1428            MessageImp(*targetRunFile).Write(cTime, msg.str().c_str(),  fQuality);
    14201429            if (!CheckForOfstreamError(*targetRunFile, false))
    14211430                return;
Note: See TracChangeset for help on using the changeset viewer.