Changeset 164 in dev for trunk/jenga/include


Ignore:
Timestamp:
Jun 17, 2007, 1:44:55 PM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/jenga/include/common
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/include/common/logger.h

    r154 r164  
    1212#include <stdarg.h>
    1313
     14#include <jenga/include/common/Environment.h>
     15
    1416#define STDX_DSTREAM_BUFFERING
    1517
    1618
    1719using namespace std;
     20
     21namespace Jenga{
     22namespace Common{
    1823
    1924
     
    4954inline void basic_dbg_streambuf<char>::dbg_out(const char *str)
    5055{
    51     ofstream ofs( ( (string)/*BasicSystemDir +*/ "logger.log" ).c_str(), ios_base::app );
     56    ofstream ofs( ( Environment::GetAppDir() + "\\logger.log" ).c_str(), ios_base::app );
    5257    ofs << str ;
    5358    ofs.close();
     
    6166    basic_dbg_streambuf<Ch_T, Tr_T>())
    6267    {
    63         ofstream ofs( ( (string)/*BasicSystemDir +*/ + "logger.log" ).c_str(), ios_base::trunc );
     68        ofstream ofs( ( Environment::GetAppDir() + "\\logger.log" ).c_str(), ios_base::trunc );
    6469        ofs.close();
    6570    }
     
    7277};
    7378
    74 // ログ生成しない場合はこの下の行をコメントアウトする
    75 #define USE_TRACE
    7679
    77 #ifdef USE_TRACE
    7880static 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.