1 Star 1 Fork 10

李建成/geoda

forked from geoda/geoda_mirror 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
logger.cpp 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
Xun Li 提交于 2016-11-16 11:13 . update ui for varschooserdlg
// Copyright (c) 2005, 2006
// Seweryn Habdank-Wojewodzki
// Distributed under the Boost Software License,
// Version 1.0.
// (copy at http://www.boost.org/LICENSE_1_0.txt)
#include "logger.h"
#if !defined(CLEANLOG)
#define FTLOG
#if !defined(DEBUG)
#undef FTLOG
#undef TLOG
#endif
//#if defined (FTLOG)
//#include <fstream>
//#else
#include <iostream>
// http://www.msobczak.com/prog/bin/nullstream.zip
#include "nullstream.h"
//#endif
logger_t::logger_t()
{}
bool logger_t::is_activated = true;
#if defined(TLOG)
std::auto_ptr<std::ostream> logger_t::outstream_helper_ptr
= std::auto_ptr<std::ostream>( new NullStream );
std::ostream * logger_t::outstream = &std::cout;
#elif defined (ETLOG)
std::auto_ptr<std::ostream> logger_t::outstream_helper_ptr
= std::auto_ptr <std::ostream>( new NullStream );
std::ostream * logger_t::outstream = &std::cerr;
#elif defined (FTLOG)
//std::auto_ptr <std::ostream> logger_t::outstream_helper_ptr
//= std::auto_ptr<std::ostream>( new std::ofstream ("oldlogger.txt"));
//std::ostream * logger_t::outstream = outstream_helper_ptr.get();
std::auto_ptr<std::ostream> logger_t::outstream_helper_ptr
= std::auto_ptr <std::ostream>( new NullStream );
std::ostream * logger_t::outstream = &std::cout;
// here is a place for user defined output stream
// and compiler flag
#else
std::auto_ptr<std::ostream> logger_t::outstream_helper_ptr
= std::auto_ptr<std::ostream>( new NullStream );
std::ostream* logger_t::outstream = outstream_helper_ptr.get();
#endif
logger_t & logger()
{
static logger_t* ans = new logger_t();
return *ans;
}
#endif
// !CLEANLOG
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Lee_Jiancheng/geoda.git
[email protected]:Lee_Jiancheng/geoda.git
Lee_Jiancheng
geoda
geoda
master

搜索帮助