|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 ============================================================================ 00003 Name : logger.h 00004 Author : 00005 Version : 1.1 00006 Copyright : This material, including documentation and any related computer 00007 programs, is protected by copyright controlled by Nokia Corporation. 00008 Description : CHsWidgetExample declaration 00009 ============================================================================ 00010 */ 00011 00012 #ifndef __FILELOGGER_H__ 00013 #define __FILELOGGER_H__ 00014 00015 #include <e32std.h> 00016 #include <flogger.h> // link against flogger.lib 00017 00018 _LIT( KLogsDir, "HSWidget"); 00019 _LIT( KLogFileName, "hswidget_log.txt"); 00020 00021 #ifdef _DEBUG 00022 00023 #define __LOGSTR_TOFILE(S) { _LIT(KTmpStr, S); RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, KTmpStr()); } 00024 #define __LOGSTR_TOFILE1(S, P0) { _LIT(KTmpStr, S); RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(KTmpStr()),P0); } 00025 #define __LOGSTR_TOFILE2(S, P0, P1) { _LIT(KTmpStr, S); RFileLogger::WriteFormat(KLogsDir(), KLogFileName(), EFileLoggingModeAppend, TRefByValue<const TDesC>(KTmpStr()),P0,P1); } 00026 00027 #else 00028 00029 #define __LOGSTR_TOFILE(S) 00030 #define __LOGSTR_TOFILE1(S, P0) 00031 #define __LOGSTR_TOFILE2(S, P0, P1) 00032 00033 #endif 00034 00035 #endif /* __FILELOGGER_H__ */ 00036
|
© Nokia 2009 |