metadataengine/server/src/mdslogger.cpp
changeset 1 acef663c1218
parent 0 c53acadfccc6
child 6 646a02f170b9
equal deleted inserted replaced
0:c53acadfccc6 1:acef663c1218
    18 #include "mdsclausebuffer.h"
    18 #include "mdsclausebuffer.h"
    19 #include "mdssqliteconnection.h"
    19 #include "mdssqliteconnection.h"
    20 
    20 
    21 
    21 
    22 #ifdef LOG_MASTER_FLAG
    22 #ifdef LOG_MASTER_FLAG
       
    23 #ifdef _DEBUG
    23 
    24 
    24 // ========================= MEMBER FUNCTIONS ==================================
    25 // ========================= MEMBER FUNCTIONS ==================================
    25 
    26 
    26 // ------------------------------------------------
    27 // ------------------------------------------------
    27 // NewInstanceL
    28 // NewInstanceL
   147 
   148 
   148 // ------------------------------------------------
   149 // ------------------------------------------------
   149 // CheckSize
   150 // CheckSize
   150 // ------------------------------------------------
   151 // ------------------------------------------------
   151 //
   152 //
       
   153 #ifdef MDE_FILE_LOGGING
   152 void CMdSLogger::CheckSize( TInt aLines )
   154 void CMdSLogger::CheckSize( TInt aLines )
   153     {
   155     {
   154 #ifdef MDE_FILE_LOGGING
       
   155     iLineCounter += aLines;
   156     iLineCounter += aLines;
   156     if ( iLineCounter < KLogfileMaxLength ) return; // no worries
   157     if ( iLineCounter < KLogfileMaxLength ) return; // no worries
   157 
   158 
   158     iLineCounter = 0;
   159     iLineCounter = 0;
   159 
   160 
   168         {
   169         {
   169         iLog.CreateLog(KDirectory, KFilename, EFileLoggingModeOverwrite);
   170         iLog.CreateLog(KDirectory, KFilename, EFileLoggingModeOverwrite);
   170         iAltFileFlag = EFalse;        
   171         iAltFileFlag = EFalse;        
   171         }    
   172         }    
   172     iLog.SetDateAndTime(EFalse, ETrue);
   173     iLog.SetDateAndTime(EFalse, ETrue);
       
   174     }
   173 #else
   175 #else
   174     aLines = 0;
   176 void CMdSLogger::CheckSize( TInt /*aLines*/ )
   175 #endif
   177     {
   176     }
   178     // Nothing to check
       
   179     }
       
   180 #endif
   177 
   181 
   178 // ---------------------------------------------------------------------------
   182 // ---------------------------------------------------------------------------
   179 // DescribeL                Returns sql clause with variables
   183 // DescribeL                Returns sql clause with variables
   180 // ---------------------------------------------------------------------------
   184 // ---------------------------------------------------------------------------
   181 //
   185 //
   329         default:
   333         default:
   330             User::Leave( KErrCorrupt );
   334             User::Leave( KErrCorrupt );
   331         }
   335         }
   332     }
   336     }
   333 
   337 
       
   338 #endif // _DEBUG
   334 #endif // LOG_MASTER_FLAG
   339 #endif // LOG_MASTER_FLAG
       
   340