From fed9361608ccafba88ba7be3b54fcf8f10c13c22 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 21 Oct 2024 09:06:00 -0700 Subject: [PATCH] logging fixes/tweaks --- .efrocachemap | 90 ++++++++++----------- CHANGELOG.md | 2 +- src/assets/ba_data/python/babase/_app.py | 16 ++-- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/base/base.cc | 2 +- src/ballistica/core/core.cc | 17 ++-- src/ballistica/core/python/core_python.cc | 8 ++ src/ballistica/core/python/core_python.h | 1 + src/ballistica/shared/ballistica.cc | 2 +- src/meta/bacoremeta/pyembed/binding_core.py | 1 + tools/bacommon/logging.py | 8 +- tools/efrotools/xcodebuild.py | 47 +++++++++++ 12 files changed, 132 insertions(+), 64 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index c366859b..7b1c916b 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4096,56 +4096,56 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "03751f224ff1d9cb180bd3c29fecfffc", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "3fda769fd02af8dbc52f21c75053ceef", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "645402b26da0b870165ccc19d3f1a9a3", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4e2752ec4059f95cd547fce9a7b92ee6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "907bdaadbd708758f1a1c2a1f25221bc", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "acc7943dcddbe9091f2b02d7de285320", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "550e45883913d6b79dac641d2fd62169", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "fb1469e7832b29285293a037016f0bc2", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "df690309667b176961fa8ff2dcbe3d66", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "dd40fc692b4a1059ed877cbef6a463de", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "d36435109f5c842bc42673656c456c6f", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "66d32acd4ef582737d0b1554ea24e024", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "e86abf7520d0fa01fde66895ee76b274", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "145da896caf778e6bf548cf92476659b", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "0d7a782902f38e96c77779bd11e3644e", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "d761efb5fe5934038b14fa5bb87e9555", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "9922c10e8c64291395e432b784c1aaa1", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "70dfd9b79a9355d3623e15f61295f89b", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "9c93da9a220ed8ddf54acd8e3320c8d8", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "df9dc6ad492e00051bade37be7ef2672", - "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "653df60722ed096b8cc3ac3a4196e5a5", - "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "f82c1e575e8f23c1e278db61a740a4d5", - "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "653df60722ed096b8cc3ac3a4196e5a5", - "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "f82c1e575e8f23c1e278db61a740a4d5", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "90125afd27068280c96cf37c950b641f", - "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "a210d341f1842b21ebbaadd80ae4a282", - "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "90125afd27068280c96cf37c950b641f", - "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "a210d341f1842b21ebbaadd80ae4a282", - "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "cdf4fca1c1aaae2c2294263f0717b333", - "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "937b954eed2571cb4d5f9d2a0e3f77ed", - "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "cdf4fca1c1aaae2c2294263f0717b333", - "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "937b954eed2571cb4d5f9d2a0e3f77ed", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "cdd7c61d6c0efd5fb0442e625123b63f", - "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "ea327f45634a8e42259c5ecadf219e36", - "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "547362a74979fa82b854a475dffeae90", - "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "ea327f45634a8e42259c5ecadf219e36", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "b590a38017172560a8fbda38ecb77960", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "56195775dd8d2c9dfdb268d1c1573087", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "876e8a437bfda095c2aa07f368db5339", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "e8e5d20dbcf6f7cc68fb13d814538374", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "72db0f512d4e5eb4604e187b0dc84cc7", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "2ff965a9427d9cf1a32f6ab03f7212de", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "db52582072dea3dc84b726022776ac03", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "778c8744b4c09e85a4269b2475469f72", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "da152308175876e12d1fd61b7038df02", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "7e93d9c9e287ec35b2f8a86c7a57fc7b", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "13a4f65de29759e0c4c7588b2f4c85dd", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "7133d473ee6490f9fce7b8916fee5b9a", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "b93a977c538d97c47e01aae0a4af4d66", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "885c9d46ba5142534fc905c775739aaa", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b66549fb209759b77c8a7d54c2637f26", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "810ca7396139727250ba091563532933", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "df466982e60d1db932bf4738b93b009b", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "cc42edf60167c47a80b4ad1b390a5831", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "2fdcb711ee0a961c8f58f3ec2798404f", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "f91a21a33133cdbede42253fb8d1811a", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "851a87095ec605adbfb2c8c4b6d8b6fc", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "5a066d510cd9754fb62dd387f1fb027a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "515b49ddd02f301d63d63598aee051b0", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "cfc6054e31108d5243f3b8ee615a1885", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "d45d89d9dcd23d48aeacb17eb5b7c657", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "d078987a105f68090bba9fa7162f134b", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "730e6a3047bcd498b4579e1c9909d1e4", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "7db95793400c71f121f238846a256813", + "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "b33ff0f1a8fb45c0446be12bb8ba2f2c", + "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "6b2ad709be9bcacffd39fb5dd5080fb0", + "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "b33ff0f1a8fb45c0446be12bb8ba2f2c", + "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "6b2ad709be9bcacffd39fb5dd5080fb0", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "509b9ffddb42fc7f6db08ee019a42566", + "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "7a2ee758ec32e5da19714bca2b72e7f6", + "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "509b9ffddb42fc7f6db08ee019a42566", + "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "7a2ee758ec32e5da19714bca2b72e7f6", + "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "e4d747889c70c91519e773242904ecbd", + "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "7045f94dc595d1dfbfd129b02112f47d", + "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "e4d747889c70c91519e773242904ecbd", + "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "7045f94dc595d1dfbfd129b02112f47d", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "7bdfe08cd93eb25bd9a001ceb47d1877", + "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "aa35e18a975a33a4ac9608f90ba118e9", + "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "6b12eddf630f4652755aa4d3d5e380e3", + "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "aa35e18a975a33a4ac9608f90ba118e9", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "4f872ff45ddeb2b3056489292da46f52", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "0d0e44d50344f795c07185e6d4f9ec81", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "49d2caef81494124cb85992aba6f4a22", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9e9f00e74bec9c9947ad2842db2ec8e9", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "0a5b580a87a3dd32a49670a02e3680a2", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "64c8b74f91155d496ab0359e44e356dc", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "56b287a0de1750bbe7a2a1616521202b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "7fc0d651ab677f4af41cf9051649eab5", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad", "src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d", "src/ballistica/base/mgen/pyembed/binding_base_app.inc": "f0f9dc33ecd4ef7a384f131d62c96c97", "src/ballistica/classic/mgen/pyembed/binding_classic.inc": "3ceb412513963f0818ab39c58bf292e3", - "src/ballistica/core/mgen/pyembed/binding_core.inc": "73bbc63c2a85aed75c26cfedf047fd9d", + "src/ballistica/core/mgen/pyembed/binding_core.inc": "ef193d5aff7c59395693c66f134b3b94", "src/ballistica/core/mgen/pyembed/env.inc": "f015d726b44d2922112fc14d9f146d8b", "src/ballistica/core/mgen/python_modules_monolithic.h": "fb967ed1c7db0c77d8deb4f00a7103c5", "src/ballistica/scene_v1/mgen/pyembed/binding_scene_v1.inc": "c25b263f2a31fb5ebe057db07d144879", diff --git a/CHANGELOG.md b/CHANGELOG.md index f5a527a1..109dbd68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.37 (build 22047, api 9, 2024-10-20) +### 1.7.37 (build 22049, api 9, 2024-10-21) - Bumping api version to 9. As you'll see below, there's some UI changes that will require a bit of work for any UI mods to adapt to. If your mods don't touch UI stuff at all you can simply bump your api version and call it a day. diff --git a/src/assets/ba_data/python/babase/_app.py b/src/assets/ba_data/python/babase/_app.py index f7cbb99e..74516011 100644 --- a/src/assets/ba_data/python/babase/_app.py +++ b/src/assets/ba_data/python/babase/_app.py @@ -921,7 +921,7 @@ class App: if self._native_shutdown_complete_called: if self.state is not self.State.SHUTDOWN_COMPLETE: self.state = self.State.SHUTDOWN_COMPLETE - _babase.lifecyclelog('app state shutdown complete') + _babase.lifecyclelog(f'app-state is now {self.state.name}') self._on_shutdown_complete() # Shutdown trumps all. Though we can't start shutting down until @@ -931,7 +931,7 @@ class App: # Entering shutdown state: if self.state is not self.State.SHUTTING_DOWN: self.state = self.State.SHUTTING_DOWN - _babase.lifecyclelog('app state shutting down') + _babase.lifecyclelog(f'app-state is now {self.state.name}') self._on_shutting_down() elif self._native_suspended: @@ -948,7 +948,7 @@ class App: if self._initial_sign_in_completed and self._meta_scan_completed: if self.state != self.State.RUNNING: self.state = self.State.RUNNING - _babase.lifecyclelog('app state running') + _babase.lifecyclelog(f'app-state is now {self.state.name}') if not self._called_on_running: self._called_on_running = True self._on_running() @@ -957,7 +957,7 @@ class App: elif self._init_completed: if self.state is not self.State.LOADING: self.state = self.State.LOADING - _babase.lifecyclelog('app state loading') + _babase.lifecyclelog(f'app-state is now {self.state.name}') if not self._called_on_loading: self._called_on_loading = True self._on_loading() @@ -966,7 +966,7 @@ class App: elif self._native_bootstrapping_completed: if self.state is not self.State.INITING: self.state = self.State.INITING - _babase.lifecyclelog('app state initing') + _babase.lifecyclelog(f'app-state is now {self.state.name}') if not self._called_on_initing: self._called_on_initing = True self._on_initing() @@ -975,7 +975,7 @@ class App: elif self._native_start_called: if self.state is not self.State.NATIVE_BOOTSTRAPPING: self.state = self.State.NATIVE_BOOTSTRAPPING - _babase.lifecyclelog('app state native bootstrapping') + _babase.lifecyclelog(f'app-state is now {self.state.name}') else: # Only logical possibility left is NOT_STARTED, in which # case we should not be getting called. @@ -1086,10 +1086,10 @@ class App: # Spin and wait for anything blocking shutdown to complete. starttime = _babase.apptime() - _babase.lifecyclelog('shutdown-suppress wait begin') + _babase.lifecyclelog('shutdown-suppress-wait begin') while _babase.shutdown_suppress_count() > 0: await asyncio.sleep(0.001) - _babase.lifecyclelog('shutdown-suppress wait end') + _babase.lifecyclelog('shutdown-suppress-wait end') duration = _babase.apptime() - starttime if duration > 1.0: logging.warning( diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index f20acadf..71911402 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -53,7 +53,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 22047 +TARGET_BALLISTICA_BUILD = 22049 TARGET_BALLISTICA_VERSION = '1.7.37' diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index f4d2e111..534b7486 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -423,7 +423,7 @@ void BaseFeatureSet::LogVersionInfo_() { snprintf(buffer, sizeof(buffer), "BallisticaKit %s build %d.", kEngineVersion, kEngineBuildNumber); } - Log(LogName::kBa, LogLevel::kInfo, buffer); + Log(LogName::kBaLifecycle, LogLevel::kInfo, buffer); } void BaseFeatureSet::set_app_mode(AppMode* mode) { diff --git a/src/ballistica/core/core.cc b/src/ballistica/core/core.cc index f6b759a6..0eaf4499 100644 --- a/src/ballistica/core/core.cc +++ b/src/ballistica/core/core.cc @@ -10,6 +10,7 @@ #include "ballistica/core/platform/core_platform.h" #include "ballistica/core/python/core_python.h" +#include "ballistica/shared/foundation/inline.h" #include "ballistica/shared/foundation/macros.h" #include "ballistica/shared/foundation/types.h" #include "ballistica/shared/generic/runnable.h" @@ -310,11 +311,17 @@ void CoreFeatureSet::LifecycleLog(const char* msg, double offset_seconds) { return; } - // We include time-since-start as part of the message here. - char buffer[128]; - snprintf(buffer, sizeof(buffer), "%s @ %.3fs.", msg, - g_core->GetAppTimeSeconds() + offset_seconds); - Log(LogName::kBaLifecycle, LogLevel::kDebug, buffer); + // We're now showing relative timestamps in more places so trying without + // adding that to the message... + if (explicit_bool(false)) { + // We include time-since-start as part of the message here. + char buffer[128]; + snprintf(buffer, sizeof(buffer), "%s @ %.3fs.", msg, + g_core->GetAppTimeSeconds() + offset_seconds); + Log(LogName::kBaLifecycle, LogLevel::kDebug, buffer); + } else { + Log(LogName::kBaLifecycle, LogLevel::kDebug, msg); + } } auto CoreFeatureSet::HeadlessMode() -> bool { diff --git a/src/ballistica/core/python/core_python.cc b/src/ballistica/core/python/core_python.cc index 0c503a48..d0a53022 100644 --- a/src/ballistica/core/python/core_python.cc +++ b/src/ballistica/core/python/core_python.cc @@ -177,6 +177,7 @@ void CorePython::EnablePythonLoggingCalls() { auto gil{Python::ScopedInterpreterLock()}; // Make sure we've got all our logging Python bits we need. + assert(objs().Exists(ObjID::kLoggingLevelNotSet)); assert(objs().Exists(ObjID::kLoggingLevelDebug)); assert(objs().Exists(ObjID::kLoggingLevelInfo)); assert(objs().Exists(ObjID::kLoggingLevelWarning)); @@ -240,11 +241,14 @@ void CorePython::UpdateInternalLoggerLevels(LogLevel* log_levels) { assert(python_logging_calls_enabled_); assert(Python::HaveGIL()); + const int log_level_not_set{0}; const int log_level_debug{10}; const int log_level_info{20}; const int log_level_warning{30}; const int log_level_error{40}; const int log_level_critical{50}; + assert(log_level_not_set + == objs().Get(ObjID::kLoggingLevelNotSet).ValueAsInt()); assert(log_level_debug == objs().Get(ObjID::kLoggingLevelDebug).ValueAsInt()); assert(log_level_info == objs().Get(ObjID::kLoggingLevelInfo).ValueAsInt()); assert(log_level_warning @@ -275,6 +279,10 @@ void CorePython::UpdateInternalLoggerLevels(LogLevel* log_levels) { auto outval{static_cast(out.ValueAsInt())}; switch (outval) { + // We ask for resolved level here so we normally shouldn't get NOTSET; + // however if the root logger is set to that then we do. It means + // don't apply filtering, so effectively its the same as debug for us. + case log_level_not_set: case log_level_debug: log_levels[static_cast(logname)] = LogLevel::kDebug; break; diff --git a/src/ballistica/core/python/core_python.h b/src/ballistica/core/python/core_python.h index 4a045e52..1f35c11d 100644 --- a/src/ballistica/core/python/core_python.h +++ b/src/ballistica/core/python/core_python.h @@ -24,6 +24,7 @@ class CorePython { kJsonDumpsCall, kJsonLoadsCall, kEmptyTuple, + kLoggingLevelNotSet, kLoggingLevelDebug, kLoggingLevelInfo, kLoggingLevelWarning, diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 4e4d28dc..c730513a 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -40,7 +40,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 22047; +const int kEngineBuildNumber = 22049; const char* kEngineVersion = "1.7.37"; const int kEngineApiVersion = 9; diff --git a/src/meta/bacoremeta/pyembed/binding_core.py b/src/meta/bacoremeta/pyembed/binding_core.py index 45c9b08d..73e34b7f 100644 --- a/src/meta/bacoremeta/pyembed/binding_core.py +++ b/src/meta/bacoremeta/pyembed/binding_core.py @@ -17,6 +17,7 @@ values = [ copy.copy, # kShallowCopyCall json.dumps, # kJsonDumpsCall json.loads, # kJsonLoadsCall + logging.NOTSET, # kLoggingLevelNotSet logging.DEBUG, # kLoggingLevelDebug logging.INFO, # kLoggingLevelInfo logging.WARNING, # kLoggingLevelWarning diff --git a/tools/bacommon/logging.py b/tools/bacommon/logging.py index 4ee7fd02..81f9baf3 100644 --- a/tools/bacommon/logging.py +++ b/tools/bacommon/logging.py @@ -15,5 +15,9 @@ if TYPE_CHECKING: def get_base_logger_control_config_client() -> LoggerControlConfig: """Return the logger-control-config used by the ballistica client.""" - # Just info for everything by default. - return LoggerControlConfig(levels={'root': logging.INFO}) + # By default, go with WARNING on everything to keep things mostly + # clean but show INFO for ba.lifecycle to get basic app + # startup/shutdown messages. + return LoggerControlConfig( + levels={'root': logging.WARNING, 'ba.lifecycle': logging.INFO} + ) diff --git a/tools/efrotools/xcodebuild.py b/tools/efrotools/xcodebuild.py index 48d51973..0b9b384f 100644 --- a/tools/efrotools/xcodebuild.py +++ b/tools/efrotools/xcodebuild.py @@ -60,6 +60,7 @@ class _Section(Enum): SWIFTGENERATEPCH = 'SwiftGeneratePch' SWIFTDRIVER = 'SwiftDriver' SWIFTDRIVERJOBDISCOVERY = 'SwiftDriverJobDiscovery' + CONSTRUCTSTUBEXECUTORLINKFILELIST = 'ConstructStubExecutorLinkFileList' SWIFTEMITMODULE = 'SwiftEmitModule' COMPILESWIFT = 'CompileSwift' MKDIR = 'MkDir' @@ -70,6 +71,7 @@ class _Section(Enum): COMPILESTORYBOARD = 'CompileStoryboard' CONVERTICONSETFILE = 'ConvertIconsetFile' LINKSTORYBOARDS = 'LinkStoryboards' + PRECOMPILESWIFTBRIDGINGHEADER = 'PrecompileSwiftBridgingHeader' PROCESSINFOPLISTFILE = 'ProcessInfoPlistFile' COPYSWIFTLIBS = 'CopySwiftLibs' REGISTEREXECUTIONPOLICYEXCEPTION = 'RegisterExecutionPolicyException' @@ -441,12 +443,35 @@ class XCodeBuild: sys.stdout.flush() return + if line.startswith(' builtin-ScanDependencies '): + lastbit = line.split('/')[-1].strip() + sys.stdout.write( + f'{Clr.BLU}Scanning Dependencies: {lastbit}{Clr.RST}\n' + ) + sys.stdout.flush() + return + + if line.startswith('ScanDependencies '): + return + + if line.startswith('PrecompileModule '): + # sys.stdout.write('PRECOMPILING\n') + # sys.stdout.flush() + return + + if line.startswith(' builtin-precompileModule '): + lastbit = line.split('/')[-1].split('-')[0] + sys.stdout.write(f'{Clr.BLU}Precompiling {lastbit}{Clr.RST}\n') + sys.stdout.flush() + return + # Seeing these popping up in the middle of other stuff a lot. if any( line.startswith(x) for x in [ 'SwiftDriver\\ Compilation\\ Requirements ', 'SwiftDriver\\ Compilation ', + ' Using response file:', ] ): return @@ -505,6 +530,13 @@ class XCodeBuild: self._print_simple_section_line( line, ignore_line_starts=['builtin-swiftHeaderTool'] ) + elif self._section is _Section.PRECOMPILESWIFTBRIDGINGHEADER: + self._print_simple_section_line( + line, + prefix='Precompiling Swift Briding Header', + ignore_line_start_tails=['/swift-frontend'], + ) + elif self._section is _Section.SWIFTDRIVER: self._print_simple_section_line( line, @@ -513,13 +545,24 @@ class XCodeBuild: 'builtin-Swift-Compilation', ], ) + elif self._section is _Section.CONSTRUCTSTUBEXECUTORLINKFILELIST: + self._print_simple_section_line( + line, + ignore_line_starts=[ + 'construct-stub-executor-link-file-list', + 'note: Using stub executor library with Swift entry point', + ], + ) + elif self._section is _Section.SWIFTEMITMODULE: self._print_simple_section_line( line, ignore_line_starts=[ 'builtin-SwiftDriver', 'builtin-swiftTaskExecution', + 'EmitSwiftModule', ], + ignore_line_start_tails=['/swift-frontend'], ) elif self._section is _Section.SWIFTGENERATEPCH: self._print_simple_section_line( @@ -540,6 +583,9 @@ class XCodeBuild: 'builtin-Swift-Compilation-Requirements', 'builtin-Swift-Compilation', 'builtin-swiftTaskExecution', + 'builtin-ScanDependencies', + '/Applications/Xcode.app/Contents/Developer/' + 'Toolchains/XcodeDefault.xctoolchain/usr/bin/clang', ], ) elif self._section is _Section.MKDIR: @@ -717,6 +763,7 @@ class XCodeBuild: ignore_line_start_tails=['/derq'], ) elif self._section is _Section.WRITEAUXILIARYFILE: + # EW: this spits out our full list of entitlements line by line. # We should make this smart enough to ignore that whole section # but just ignoring specific exact lines for now.