mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 03:42:47 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62938 954022d7-b5bf-4e40-9824-e11837661b57
35 lines
648 B
C++
35 lines
648 B
C++
#pragma once
|
|
|
|
#include <iosfwd>
|
|
|
|
|
|
namespace cpdoccore
|
|
{
|
|
template <class Ostream>
|
|
class logging
|
|
{
|
|
public:
|
|
logging(Ostream &stream) : ostream_(stream)
|
|
{}
|
|
|
|
template <class T>
|
|
Ostream & operator << (const T & t)
|
|
{
|
|
ostream_ << t;
|
|
return ostream_;
|
|
}
|
|
|
|
private:
|
|
Ostream & ostream_;
|
|
};
|
|
|
|
extern logging< std::wostream > logging_cout;
|
|
extern logging< std::wstringstream >logging_log;
|
|
}
|
|
|
|
#ifdef _DEBUG
|
|
#define _CP_LOG cpdoccore::logging_cout
|
|
#else
|
|
#define _CP_LOG cpdoccore::logging_log
|
|
#endif
|