源码安装:

1, ./configure --omit=Data/MySQL,Data/ODBC,Zip,Crypto,NetSSL_OpenSSL     --no-samples  --no-tests --shared

默认为 shared ,--static 编译静态库

 --prefix=/usr  

 

2, make

3, sudo make install

4,  sudo ldconfig

 

_______________________________________________________

AutoPtr<SimpleFileChannel> pChannel(new SimpleFileChannel);
pChannel->setProperty("path", "sample.log");
pChannel->setProperty("rotation", "2 K");
Logger::root().setChannel(pChannel);
Logger& logger = Logger::get("TestLogger"); //这句一定要放在后面才行。不能先get。

相关文章: