mmappcomponents/videoplaylistutility/inc/videoplaylistutility_log.h
branchRCL_3
changeset 9 bee149131e4b
parent 0 a2952bb97e68
child 25 d881023c13eb
child 55 6c1dfe4da5dd
--- a/mmappcomponents/videoplaylistutility/inc/videoplaylistutility_log.h	Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/videoplaylistutility/inc/videoplaylistutility_log.h	Fri Feb 19 23:18:32 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,130 +15,106 @@
 *
 */
 
-// Version : %version: 2 %
-
-
+// Version : %version: 3 %
 
 
 #ifndef VIDEOPLAYLISTUTILITY_LOG_H
 #define VIDEOPLAYLISTUTILITY_LOG_H
 
+
 // INCLUDES
 #include <e32std.h>
 #include <e32svr.h>
 #include <e32des16.h>
 #include <e32property.h>
-#include <flogger.h>
 #include <e32def.h>
 
 
-
-// #define _VPU_FILE_LOGGING_
-
+//
+//  MACROS
+//
 #ifdef _DEBUG
-    #define VPU_DEBUG RDebug::Print
+    #define VIDEOPLAYLISTUTILITY_DEBUG        TVideoPlaylistUtilityLog::VideoPlaylistUtilityLog
+    #define VIDEOPLAYLISTUTILITY_ENTER_EXIT   TEnterExitLog _s
 #else
-    #ifdef _VPU_FILE_LOGGING_
-        #define VPU_DEBUG VideoPlaylistUtilityDebug::FileLog
-    #else
-        #define VPU_DEBUG RDebug::Print
-    #endif
-#endif 
+    #define VIDEOPLAYLISTUTILITY_DEBUG        TVideoPlaylistUtilityLog::NullLog
+    #define VIDEOPLAYLISTUTILITY_ENTER_EXIT   TVideoPlaylistUtilityLog::NullLog
+#endif
 
 
-class VideoPlaylistUtilityDebug
+class TVideoPlaylistUtilityLog : public TDes16Overflow
 {
     public:
+
         inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... )
         {
         }
 
-        inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... )
-        {
-            VA_LIST list;
-            VA_START(list,aFmt);
-            RFileLogger::WriteFormat( _L("VideoPlaylistUtility"), 
-                                      _L("videoplaylistutility.log"),
-                                      EFileLoggingModeAppend,
-                                      aFmt,
-                                      list );
-        }
-};
-
-
-
-// MACROS
-#define VIDEOPLAYLISTUTILITY_DEBUG             TVideoPlaylistUtilityLog::VideoPlaylistUtilityLog
-#define VIDEOPLAYLISTUTILITY_ENTER_EXIT        TEnterExitLog _s
-
-class TVideoPlaylistUtilityLog : public TDes16Overflow
-{
-    public:
-        
         inline static void VideoPlaylistUtilityLog( TRefByValue<const TDesC16> aFmt, ... )
         {
             TBuf< 512 > buffer;
-            
+
             VA_LIST list;
             VA_START( list, aFmt );
             buffer.AppendFormatList( aFmt, list );
             VA_END(list);
-            
-            VPU_DEBUG(_L("#VideoPlaylistUtility# %S"), &buffer );
+
+            RDebug::Print(_L("#VideoPlaylistUtility# %S"), &buffer );
         }
 };
 
 class TEnterExitLog : public TDes16Overflow
 {
     public:
-        
+
         void Overflow(TDes16& /*aDes*/)
         {
-            VPU_DEBUG(_L("%S Logging Overflow"), &iFunctionName);
+            RDebug::Print(_L("%S Logging Overflow"), &iFunctionName);
         }
 
         TEnterExitLog( TRefByValue<const TDesC> aFunctionName,
                        TRefByValue<const TDesC> aFmt, ... )
         {
             iFunctionName = HBufC::New( TDesC(aFunctionName).Length() );
-            
+
             if ( iFunctionName )
             {
                 iFunctionName->Des().Copy(aFunctionName);
             }
-            
+
             TBuf< 512 > buffer;
-            
+
             VA_LIST list;
             VA_START( list, aFmt );
             buffer.AppendFormatList( aFmt, list, this );
             VA_END(list);
-            
-            VPU_DEBUG(_L("#VideoPlaylistUtility# --> %S %S"), iFunctionName, &buffer );
+
+            RDebug::Print(_L("#VideoPlaylistUtility# --> %S %S"), iFunctionName, &buffer );
         }
-        
+
         TEnterExitLog( TRefByValue<const TDesC> aFunctionName )
         {
             iFunctionName = HBufC::New( TDesC(aFunctionName).Length() );
-            
+
             if ( iFunctionName )
             {
                 iFunctionName->Des().Copy(aFunctionName);
             }
-            
-            VPU_DEBUG(_L("#VideoPlaylistUtility# --> %S"), iFunctionName );
+
+            RDebug::Print(_L("#VideoPlaylistUtility# --> %S"), iFunctionName );
         }
-        
+
         ~TEnterExitLog()
         {
-            VPU_DEBUG(_L("#VideoPlaylistUtility# <-- %S"), iFunctionName );
+            RDebug::Print(_L("#VideoPlaylistUtility# <-- %S"), iFunctionName );
             delete iFunctionName;
         }
-        
+
     private:
         HBufC*    iFunctionName;
 };
 
+
 _LIT(_KVPUErrorInfo, "#VideoPlaylistUtility# Error : error %d file %s line %d");
 
 #define VIDEOPLAYLISTUTILITY_S(a) _S(a)