133 #ifndef OPENTXS_CORE_OTLOG_HPP
134 #define OPENTXS_CORE_OTLOG_HPP
143 #if defined(unix) || defined(__unix__) || defined(__unix) || \
144 defined(__APPLE__) || defined(linux) || defined(__linux) || \
146 #define PREDEF_PLATFORM_UNIX 1
149 #if defined(debug) || defined(_DEBUG) || defined(DEBUG)
150 #define PREDEF_MODE_DEBUG 1
163 #define OTLOG_IMPORT __declspec(dllexport)
165 #define OTLOG_IMPORT __declspec(dllimport)
201 static OTLog* pLogger;
204 static const OTString m_strPathSeparator;
221 static bool CheckLogger(
OTLog* pLogger);
227 EXPORT
static bool Init(
const OTString& strThreadContext =
"",
228 const int32_t& nLogLevel = 0);
239 EXPORT
static const char*
Version();
253 EXPORT
static bool SetLogLevel(
const int32_t& nLogLevel);
293 EXPORT
static void Output(int32_t nVerbosity,
294 const char* szOutput);
295 EXPORT
static void vOutput(int32_t nVerbosity,
const char* szOutput, ...);
306 EXPORT
static void Error(
const char* szError);
307 EXPORT
static void vError(
const char* szError, ...);
313 EXPORT
static void Errno(
const char* szLocation =
nullptr);
318 const char* szAppend =
nullptr);
327 #endif // OPENTXS_CORE_OTLOG_HPP
static EXPORT void vError(const char *szError,...)
OTLOG_IMPORT OTLogStream otLog4
virtual int overflow(int c)
static EXPORT void Output(int32_t nVerbosity, const char *szOutput)
static EXPORT const OTString & GetVersion()
static EXPORT const OTString & GetThreadContext()
static EXPORT bool PopMemlogBack()
static EXPORT bool LogToFile(const OTString &strOutput)
static EXPORT const char * PathSeparator()
static EXPORT bool SetLogLevel(const int32_t &nLogLevel)
static EXPORT OTString GetMemlogAtIndex(int32_t nIndex)
OTLOG_IMPORT OTLogStream otOut
OTLOG_IMPORT OTLogStream otLog3
static EXPORT int32_t GetMemlogSize()
size_t( fpt_Assert_sz_n_sz)(const char *, size_t, const char *)
static EXPORT void Error(const char *szError)
static EXPORT bool PopMemlogFront()
static EXPORT bool Init(const OTString &strThreadContext="", const int32_t &nLogLevel=0)
static EXPORT const char * Version()
static EXPORT void SetupSignalHandler()
OTLogStream(int _logLevel)
static EXPORT const char * LogFilePath()
static EXPORT OTString PeekMemlogBack()
static EXPORT bool Cleanup()
static EXPORT bool IsInitialized()
static EXPORT bool PushMemlogBack(const OTString &strLog)
OTLOG_IMPORT OTLogStream otInfo
static EXPORT bool SleepMilliseconds(int64_t lMilliseconds)
static EXPORT bool SleepSeconds(int64_t lSeconds)
static EXPORT int32_t LogLevel()
OTLOG_IMPORT OTLogStream otWarn
OTLOG_IMPORT OTLogStream otErr
static EXPORT const OTString & GetPathSeparator()
static EXPORT const OTString & GetLogFilePath()
static EXPORT void Errno(const char *szLocation=nullptr)
static EXPORT bool StringFill(OTString &out_strString, const char *szString, int32_t iLength, const char *szAppend=nullptr)
static EXPORT void vOutput(int32_t nVerbosity, const char *szOutput,...)
std::deque< OTString * > dequeOfStrings
static EXPORT bool PushMemlogFront(const OTString &strLog)
static EXPORT OTString PeekMemlogFront()
OTLOG_IMPORT OTLogStream otLog5