Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions android-activity/src/native_activity/glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions android-activity/src/native_activity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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"
Expand All @@ -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");
Expand Down