native_activity: Demote spammy info!/eprintln! debug logs to trace!

Ideally information - especially when spamming per `Looper` poll - used
for debugging `android-activity` doesn't show to the user unless they
use the `Trace` level (eventually for this specific crate/module).  This
is already adhered to in most places of the code but there were a few
high-volume cases still remaining.
This commit is contained in:
Marijn Suijten
2022-12-14 20:07:22 +01:00
parent 1633f62d0d
commit bf251c63cd
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");