Skip to content

std::cout Logs Not Appearing for React Native C++ Turbo Module #244

Closed Answered by cortinico
bharatkumar5 asked this question in Q&A
Discussion options

You must be logged in to vote

You won't be able to use std::cout as you'll have to use Android NDK's logging utils, like this:

#include <android/log.h>

#define APPNAME "MyApp"

__android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "The value of 1 + 1 is %d", 1+1);

You might have to also link the log library in your CMake file (but that depends on your specific setup)

Source https://stackoverflow.com/a/4629747

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cortinico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants