mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-04 05:47:26 +00:00
native-activity: use eprintln for early logging (before app sets up logging)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user