native-activity: use eprintln for early logging (before app sets up logging)

This commit is contained in:
Robert Bragg
2022-10-11 17:10:15 +01:00
parent cd32b4a064
commit 879d7cac5a
+6 -3
View File
@@ -362,7 +362,7 @@ impl WaitableNativeActivityState {
let config = super::ConfigurationRef::new(Configuration::from_ptr(
NonNull::new_unchecked(config),
));
log::debug!("Config: {:#?}", config);
eprintln!("Config: {:#?}", config);
config
};
@@ -787,8 +787,6 @@ extern "C" fn ANativeActivity_onCreate(
saved_state: *const libc::c_void,
saved_state_size: libc::size_t,
) {
log::debug!("Creating: {:p}", activity);
// Maybe make this stdout/stderr redirection an optional / opt-in feature?...
unsafe {
let mut logpipe: [RawFd; 2] = Default::default();
@@ -813,6 +811,11 @@ extern "C" fn ANativeActivity_onCreate(
});
}
eprintln!(
"Creating: {:p}, saved_state = {:p}, save_state_size = {}",
activity, saved_state, saved_state_size
);
// Conceptually we associate a glue reference with the JVM main thread, and another
// reference with the Rust main thread
let jvm_glue = NativeActivityGlue::new(activity, saved_state, saved_state_size);