Hi,

log4cxx::LoggerPtr tmpLogger( log4cxx::Logger::getLogger("SIM.TEST") );
 // set logger level
 tmpLogger->setLevel( log4cxx::Level::getDebug() );

             // set appender properties
===> log4cxx::PatternLayoutPtr layout( new log4cxx::PatternLayout( "%d %-5p [%l] [%c:%M] %m%n" ) );

try this: new log4cxx::PatternLayout( L"%d %-5p [%l] [%c:%M] %m%n" )
(yes, that is an "L" before the quotes ;-)
or switch your project to unicode.
=> i think the problem is that the pattern is interpreted as being of type char*, but the PatternLayout constructor expects unicode.

hth
peter





  log4cxx::FileAppender *ap = new log4cxx::FileAppender;
===>  ap->setLayout ( layout );
  ap->setFile ( "test.log" );
  ap->setAppend ( true );
  tmpLogger->addAppender ( ap );




The error message is shown below:


Linking...
1>LoggingTest.obj : error LNK2019: unresolved external symbol "public: __thiscall log4cxx::PatternLayout::PatternLayout(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@2@@std@@@Z) referenced in function "void __cdecl Example_04(void)" (? Example_04@@YAXXZ) 1>D:\Projects\build\logging\logging\Debug\logging.exe : fatal error LNK1120: 1 unresolved externals


     ________________________________________________________
180도 달라진 야후! 메일 - 알아서 척척! 새로운 야후! 메일은 10분에 한번 스스로 새 메시지를 받아온답니 다.
http://kr.content.mail.yahoo.com/cgland

Reply via email to