Merge pull request #49 from rust-mobile/demote-spam

native_activity: Demote spammy `info!`/`eprintln!` debug logs to `trace!`
This commit is contained in:
Robert Bragg
2022-12-20 16:59:40 +00:00
committed by GitHub
2 changed files with 8 additions and 6 deletions
+5 -3
View File
@@ -333,7 +333,7 @@ impl WaitableNativeActivityState {
let config = super::ConfigurationRef::new(Configuration::from_ptr(
NonNull::new_unchecked(config),
));
eprintln!("Config: {:#?}", config);
log::trace!("Config: {:#?}", config);
config
};
@@ -762,9 +762,11 @@ extern "C" fn ANativeActivity_onCreate(
});
}
eprintln!(
log::trace!(
"Creating: {:p}, saved_state = {:p}, save_state_size = {}",
activity, saved_state, saved_state_size
activity,
saved_state,
saved_state_size
);
// Conceptually we associate a glue reference with the JVM main thread, and another
+3 -3
View File
@@ -5,7 +5,7 @@ use std::ptr::NonNull;
use std::sync::{Arc, RwLock};
use std::time::Duration;
use log::{error, info, trace};
use log::{error, trace};
use ndk_sys::ALooper_wake;
use ndk_sys::{ALooper, ALooper_pollAll};
@@ -159,7 +159,7 @@ impl AndroidAppInner {
-1
};
info!("Calling ALooper_pollAll, timeout = {timeout_milliseconds}");
trace!("Calling ALooper_pollAll, timeout = {timeout_milliseconds}");
assert!(
!ndk_sys::ALooper_forThread().is_null(),
"Application tried to poll events from non-main thread"
@@ -170,7 +170,7 @@ impl AndroidAppInner {
&mut events,
&mut source as *mut *mut core::ffi::c_void,
);
info!("pollAll id = {id}");
trace!("pollAll id = {id}");
match id {
ndk_sys::ALOOPER_POLL_WAKE => {
trace!("ALooper_pollAll returned POLL_WAKE");