log fixes

This commit is contained in:
John Smith 2022-12-01 16:49:37 -05:00
parent e2153a34e4
commit b5c87e4882
5 changed files with 11 additions and 5 deletions

View File

@ -19,7 +19,10 @@ elif [[ "$1" == "ios" ]]; then
# Run in temporary simulator # Run in temporary simulator
xcrun simctl install $ID $SYMROOT/Debug-iphonesimulator/$APPNAME.app xcrun simctl install $ID $SYMROOT/Debug-iphonesimulator/$APPNAME.app
xcrun simctl spawn $ID log stream --level debug --predicate "subsystem == \"$BUNDLENAME\"" &
xcrun simctl launch --console $ID $BUNDLENAME xcrun simctl launch --console $ID $BUNDLENAME
sleep 1 # Ensure the last log lines print
kill -INT %1
# Clean up build output # Clean up build output
rm -rf /tmp/testout rm -rf /tmp/testout

View File

@ -156,8 +156,8 @@ cfg_if! {
} }
} }
fn update_callback(update: VeilidUpdate) { fn update_callback(_update: VeilidUpdate) {
println!("update_callback: {:?}", update); // println!("update_callback: {:?}", update);
} }
pub fn setup_veilid_core() -> (UpdateCallback, ConfigCallback) { pub fn setup_veilid_core() -> (UpdateCallback, ConfigCallback) {

View File

@ -18,7 +18,7 @@ pub fn veilid_core_setup_ios_tests() {
// Set up subscriber and layers // Set up subscriber and layers
let filter = VeilidLayerFilter::new(VeilidConfigLogLevel::Trace, None); let filter = VeilidLayerFilter::new(VeilidConfigLogLevel::Trace, None);
tracing_subscriber::registry() tracing_subscriber::registry()
.with(OsLogger::new("com.veilid.veilidtools-tests", "default").with_filter(filter)) .with(OsLogger::new("com.veilid.veilidcore-tests", "").with_filter(filter))
.init(); .init();
panic::set_hook(Box::new(|panic_info| { panic::set_hook(Box::new(|panic_info| {

View File

@ -19,7 +19,10 @@ elif [[ "$1" == "ios" ]]; then
# Run in temporary simulator # Run in temporary simulator
xcrun simctl install $ID $SYMROOT/Debug-iphonesimulator/$APPNAME.app xcrun simctl install $ID $SYMROOT/Debug-iphonesimulator/$APPNAME.app
xcrun simctl spawn $ID log stream --level debug --predicate "subsystem == \"$BUNDLENAME\"" &
xcrun simctl launch --console $ID $BUNDLENAME xcrun simctl launch --console $ID $BUNDLENAME
sleep 1 # Ensure the last log lines print
kill -INT %1
# Clean up build output # Clean up build output
rm -rf /tmp/testout rm -rf /tmp/testout

View File

@ -25,12 +25,12 @@ pub fn veilid_tools_setup_ios_tests() {
tracing_subscriber::registry() tracing_subscriber::registry()
.with(filters) .with(filters)
.with(filter::LevelFilter::TRACE) .with(filter::LevelFilter::TRACE)
.with(OsLogger::new("com.veilid.veilidtools-tests", "default")) .with(OsLogger::new("com.veilid.veilidtools-tests", ""))
.init(); .init();
} else { } else {
use oslog::OsLogger; use oslog::OsLogger;
OsLogger::new("com.veilid.veilidtools-tests", "default") OsLogger::new("com.veilid.veilidtools-tests")
.level_filter(LevelFilter::Trace) .level_filter(LevelFilter::Trace)
.init() .init()
.unwrap(); .unwrap();