# HG changeset patch # User Sebastien Jodogne # Date 1591435092 -7200 # Node ID 7f9909062d9c46b21671a3218d3927353220fedf # Parent 9b5ace33a00dcaa0a0465860a48bc926e71e008e removed EnableEmscriptenLogging() diff -r 9b5ace33a00d -r 7f9909062d9c Core/Logging.cpp --- a/Core/Logging.cpp Sat Jun 06 11:14:10 2020 +0200 +++ b/Core/Logging.cpp Sat Jun 06 11:18:12 2020 +0200 @@ -865,32 +865,6 @@ EnableInfoLevel(old->infoEnabled_); EnableTraceLevel(old->traceEnabled_); } - -#ifdef __EMSCRIPTEN__ - - static FuncStreamBuf - globalEmscriptenErrorStreamBuf_(emscripten_console_error); - static std::unique_ptr globalEmscriptenErrorStream_; - - static FuncStreamBuf - globalEmscriptenWarningStreamBuf_(emscripten_console_warn); - static std::unique_ptr globalEmscriptenWarningStream_; - - static FuncStreamBuf - globalEmscriptenInfoStreamBuf_(emscripten_console_log); - static std::unique_ptr globalEmscriptenInfoStream_; - - void EnableEmscriptenLogging() - { - globalEmscriptenErrorStream_.reset(new ostream(&globalEmscriptenErrorStreamBuf_)); - globalEmscriptenWarningStream_.reset(new ostream(&globalEmscriptenWarningStreamBuf_)); - globalEmscriptenInfoStream_.reset(new ostream(&globalEmscriptenInfoStreamBuf_)); - - SetErrorWarnInfoLoggingStreams(&globalEmscriptenErrorStream_, - &globalEmscriptenWarningStream_, - &globalEmscriptenInfoStream_); - } -#endif } } diff -r 9b5ace33a00d -r 7f9909062d9c Core/Logging.h --- a/Core/Logging.h Sat Jun 06 11:14:10 2020 +0200 +++ b/Core/Logging.h Sat Jun 06 11:18:12 2020 +0200 @@ -224,19 +224,6 @@ ORTHANC_PUBLIC void SetErrorWarnInfoLoggingStreams(std::ostream& errorStream, std::ostream& warningStream, std::ostream& infoStream); - -#ifdef __EMSCRIPTEN__ - /** - This function will change the logging streams so that the logging functions - provided by emscripten html5.h API functions are used : it will change the - error_, warning_ and info_ stream objects so that their operator<< writes - into the browser console using emscripten_console_error(), - emscripten_console_warn() and emscripten_console_log(). This will allow for - logging levels to be correctly handled by the browser when the code executes - in Web Assembly - */ - ORTHANC_PUBLIC void EnableEmscriptenLogging(); -#endif } }