File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ namespace
32
32
#include < stdexcept>
33
33
#include < memory>
34
34
#include < climits>
35
+ #include < iostream>
36
+
37
+ #ifdef __EMSCRIPTEN__
38
+ #include < emscripten/console.h>
39
+ #endif
35
40
36
41
#ifdef __CYGWIN__
37
42
namespace std
@@ -1123,8 +1128,15 @@ namespace classdesc
1123
1128
template <> string enumKey<RESTProcessType::Type >(int x){return enum_keysData<RESTProcessType::Type >::keys (x);}
1124
1129
}
1125
1130
1126
- // / and undefined hook to allow logging to console in an emscripten environment.
1127
- void log (const std::string&);
1131
+ // / allow logging to console in an emscripten environment.
1132
+ inline void log (const std::string& msg)
1133
+ {
1134
+ #ifdef __EMSCRIPTEN__
1135
+ emscripten_console_log (msg.c_str ());
1136
+ #else
1137
+ std::cout<<msg<<std::endl;
1138
+ #endif
1139
+ }
1128
1140
}
1129
1141
1130
1142
You can’t perform that action at this time.
0 commit comments