webengine/osswebengine/MemoryManager/Inc/MemoryLogger.h
branchRCL_3
changeset 94 919f36ff910f
parent 93 79859ed3eea9
--- a/webengine/osswebengine/MemoryManager/Inc/MemoryLogger.h	Tue Aug 31 16:17:46 2010 +0300
+++ b/webengine/osswebengine/MemoryManager/Inc/MemoryLogger.h	Wed Sep 01 12:28:30 2010 +0100
@@ -36,6 +36,14 @@
 _LIT8( KTab, "\t" );
 
 // MACROS
+#define MEM_LOG_CREATE()   \
+    RFs fs; \
+    _LIT( KFilePath, "C:\\Logs\\Webcore\\"); \
+    TFileName path (KFilePath); \
+    if(fs.Connect() == KErrNone) { \
+        fs.MkDirAll( path ); \
+        fs.Close(); \
+    }
 
 #define MEM_LOG(a)		{ _LIT8(temp, a); RFileLogger::Write(KMEMLogDir, KMEMLogFile, EFileLoggingModeAppend, temp); }
 #define MEM_LOGF		FPrint
@@ -127,6 +135,7 @@
 				loggers[ i ]->_accum += _peek;
 	}
 #else // OOM_LOGGING
+#define MEM_LOG_CREATE()
 #define MEM_LOG(a)
 #define MEM_LOGF
 #define C_LOG(a)
@@ -134,4 +143,4 @@
 #endif
 
 #endif
-// END OF FILE
\ No newline at end of file
+// END OF FILE