Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webarkitLOGs alternatives #6

Open
kalwalt opened this issue Jan 17, 2022 · 0 comments
Open

webarkitLOGs alternatives #6

kalwalt opened this issue Jan 17, 2022 · 0 comments
Assignees
Labels
C/C++ code concerning the C/C++ code design and improvements Emscripten enhancement New feature or request

Comments

@kalwalt
Copy link
Member

kalwalt commented Jan 17, 2022

Actually i implemented webarkitLOGi in this manner:

void webarkitLOGi(char* message) {
EM_ASM ({
var message = UTF8ToString($0);
var infoHead = UTF8ToString($1);
var style = UTF8ToString($2);
console.log(infoHead + message, style);
},
message,
WARKTinfo,
WARKTinfoStyle
);
}

but maybe we could use emscripten_log:
void emscripten_log(int flags, const char* format, ...) and webarkitLOGi could become:

void webarkitLOGi(char* message) {
  emscripten_log(EM_LOG_NO_PATHS | EM_LOG_CONSOLE, message);
}
@kalwalt kalwalt added enhancement New feature or request C/C++ code concerning the C/C++ code design and improvements Emscripten labels Jan 17, 2022
@kalwalt kalwalt self-assigned this Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C/C++ code concerning the C/C++ code design and improvements Emscripten enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant