Files
core/ASCOfficeOdfFile/include/logging.h
Elen.Subbotina 8488025896 для красоты
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@54463 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 22:41:49 +03:00

58 lines
930 B
C++

#ifndef _CPDOCCORE_LOGGING_H_INCLUDED_
#define _CPDOCCORE_LOGGING_H_INCLUDED_
#include <iosfwd>
namespace cpdoccore {
#if 1
template <class Ostream>
class logging
{
public:
logging(Ostream & Ostream) : ostream_(Ostream)
{}
template <class T>
Ostream & operator << (const T & t)
{
return (ostream_ << t );
}
private:
Ostream & ostream_;
};
#else
template <class Ostream>
class logging
{
public:
logging(Ostream & Ostream)
{}
template <class T>
logging & operator << (const T & t)
{
return *this;
}
private:
};
#endif
extern logging< std::wostream > logging_err;
extern logging< std::wostream > logging_cout;
}
#define _CP_LOG_error ::cpdoccore::logging_err
#define _CP_LOG_info ::cpdoccore::logging_err
#define _CP_LOG_warning ::cpdoccore::logging_err
#define _CP_LOG(A) _CP_LOG_##A
#endif