Add KGE_LOG_STREAM & KGE_ERROR_STREAM
This commit is contained in:
parent
53cb3659c0
commit
a2e3a1ea8c
|
|
@ -298,7 +298,7 @@ void Logger::ResetStreamToStdStream()
|
|||
}
|
||||
|
||||
// replace the C++ global locale with the user-preferred locale
|
||||
(void)std::locale::global(std::locale(""));
|
||||
(void)std::locale::global(std::locale());
|
||||
(void)std::cout.imbue(std::locale());
|
||||
(void)std::cerr.imbue(std::locale());
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,9 @@
|
|||
// THE SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include <iomanip>
|
||||
#include <kiwano/core/Common.h>
|
||||
#include <kiwano/macros.h>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <streambuf>
|
||||
|
||||
#ifndef KGE_SYS_LOG
|
||||
#ifdef KGE_DEBUG
|
||||
|
|
@ -49,6 +48,14 @@
|
|||
#define KGE_LOGF(FORMAT, ...) ::kiwano::Logger::GetInstance().Printf(::kiwano::Logger::Level::Info, FORMAT, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef KGE_LOG_STREAM
|
||||
#define KGE_LOG_STREAM() ::kiwano::Logger::GetInstance().GetOutputStream()
|
||||
#endif
|
||||
|
||||
#ifndef KGE_ERROR_STREAM
|
||||
#define KGE_ERROR_STREAM() ::kiwano::Logger::GetInstance().GetErrorStream()
|
||||
#endif
|
||||
|
||||
namespace kiwano
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue