Changeset 164 in dev for trunk/jenga/include/common
- Timestamp:
- Jun 17, 2007, 1:44:55 PM (17 years ago)
- Location:
- trunk/jenga/include/common
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/include/common/logger.h
r154 r164 12 12 #include <stdarg.h> 13 13 14 #include <jenga/include/common/Environment.h> 15 14 16 #define STDX_DSTREAM_BUFFERING 15 17 16 18 17 19 using namespace std; 20 21 namespace Jenga{ 22 namespace Common{ 18 23 19 24 … … 49 54 inline void basic_dbg_streambuf<char>::dbg_out(const char *str) 50 55 { 51 ofstream ofs( ( (string)/*BasicSystemDir +*/ "logger.log" ).c_str(), ios_base::app );56 ofstream ofs( ( Environment::GetAppDir() + "\\logger.log" ).c_str(), ios_base::app ); 52 57 ofs << str ; 53 58 ofs.close(); … … 61 66 basic_dbg_streambuf<Ch_T, Tr_T>()) 62 67 { 63 ofstream ofs( ( (string)/*BasicSystemDir +*/ + "logger.log" ).c_str(), ios_base::trunc );68 ofstream ofs( ( Environment::GetAppDir() + "\\logger.log" ).c_str(), ios_base::trunc ); 64 69 ofs.close(); 65 70 } … … 72 77 }; 73 78 74 // ログ生成しない場合はこの下の行をコメントアウトする75 #define USE_TRACE76 79 77 #ifdef USE_TRACE78 80 static basic_dbg_ostream<_TCHAR> logger; 79 #define trace(s) logger << s << endl 80 #else 81 #define trace(s) 82 #endif 81 82 83 }}
Note:
See TracChangeset
for help on using the changeset viewer.