Mercurial > hg > orthanc
diff Core/Logging.h @ 3995:1f405a3fdeca
reorganizing Logging
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 05 Jun 2020 18:08:17 +0200 |
parents | 7e8bfda62b43 |
children | c2b9a7a1c74a |
line wrap: on
line diff
--- a/Core/Logging.h Fri Jun 05 16:52:09 2020 +0200 +++ b/Core/Logging.h Fri Jun 05 18:08:17 2020 +0200 @@ -58,10 +58,6 @@ # endif #endif -#if ORTHANC_ENABLE_LOGGING_PLUGIN == 1 -# include <orthanc/OrthancCPlugin.h> -#endif - #include <boost/lexical_cast.hpp> namespace Orthanc @@ -69,7 +65,8 @@ namespace Logging { #if ORTHANC_ENABLE_LOGGING_PLUGIN == 1 - ORTHANC_PUBLIC void Initialize(OrthancPluginContext* context); + // "pluginContext" must be of type "OrthancPluginContext" + ORTHANC_PUBLIC void Initialize(void* pluginContext); #else ORTHANC_PUBLIC void Initialize(); #endif @@ -94,14 +91,12 @@ #if ORTHANC_ENABLE_LOGGING_STDIO == 1 typedef void (*LoggingFunction)(const char*); - void SetErrorWarnInfoTraceLoggingFunctions( - LoggingFunction errorLogFunc, - LoggingFunction warningLogfunc, - LoggingFunction infoLogFunc, - LoggingFunction traceLogFunc); + ORTHANC_PUBLIC void SetErrorWarnInfoTraceLoggingFunctions(LoggingFunction errorLogFunc, + LoggingFunction warningLogfunc, + LoggingFunction infoLogFunc, + LoggingFunction traceLogFunc); #endif - struct NullStream : public std::ostream { NullStream() : @@ -179,6 +174,7 @@ # define LOG(level) ::Orthanc::Logging::InternalLogger(#level, __FILE__, __LINE__) # define VLOG(level) ::Orthanc::Logging::InternalLogger("TRACE", __FILE__, __LINE__) + namespace Orthanc { namespace Logging