From 9cbf78ab37476809dec4b86578ae37e1b2741854 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 18 Jun 2023 10:37:02 -0700 Subject: [PATCH] improved logging for v2 neworking stuff --- .efrocachemap | 88 ++++++++++++++--------------- CHANGELOG.md | 6 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/base/base.cc | 8 ++- src/ballistica/base/base.h | 1 + src/ballistica/shared/ballistica.cc | 2 +- tools/efro/log.py | 1 + 7 files changed, 59 insertions(+), 49 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 5d348136..d35678bf 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4072,50 +4072,50 @@ "build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/18/4b/787a9267e17be3c49966072581a5", "build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/20/f6/4ce9bc3c1f3732f6adf8237fbe9b", "build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/a5/30/9058181df0b1255bf6950cbc7813", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/cb/2b/b20e3667a76de438a96f0afc0305", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/46/7d/7d4757c004be2572c77b06b77bee", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/e7/f1/a546a5af991fe6ca8cad30151c45", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/0a/6a/ee6c62dfc7df0ee2649b4259859f", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/5c/72/34434953e56f2dc38a38ebc06c8c", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/81/13/a5095e89d11645df552e952934b2", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/e1/5d/2284e87c1eb013e2f9719f3af758", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/be/ed/d03bd1603588c5ee3941dcb098b0", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/b5/46/2ff94d2fd35975f6a78333811fce", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/84/56/c0a936571bf54f90b4f63d2044df", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/26/27/18a284bc01bc00d58b0547a6e6cc", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/36/ac/9001c8d1bd457b7345bfc41d78e9", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/b0/8f/ae5bfba34e6c8652825165e1a91d", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/3c/29/3a0fb2e030569a1e72e26d19b79e", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/aa/8c/baa3f85599add12b5fb9c6d36a25", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7c/99/ee5199e38af7e9e26018bd8e53bf", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/54/9c/4e83da01264024628839375ee954", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/b5/8a/3c7f11a2b165425faeab02b6854b", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/ae/90/e625b0ef976e7a4d101f184ca70e", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/fb/1e/94322715fea49e0450bfc38cd2eb", - "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/e1/36/4336b37f86fd4a4870133803fab7", - "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/19/e8/69f3145d1a635ff682323d5122a7", - "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/62/12/fc103a5a8e2e6a607499b8887c65", - "build/prefab/lib/linux_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/75/d5/4fc5951cf8408dc074a523ec0ecc", - "build/prefab/lib/linux_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/e6/35/64ef9eb0aa12b25a35ec4cf94d73", - "build/prefab/lib/linux_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/f6/9f/96526d08d8d151381b999206a22c", - "build/prefab/lib/linux_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/cf/ac/6b205f3ec382b27a63835723f062", - "build/prefab/lib/linux_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/14/09/738e56ba494bfbd25b4d0fd20439", - "build/prefab/lib/mac_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/5e/15/de8816c5b0978d58a5a97b5dc96b", - "build/prefab/lib/mac_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/cf/05/4b089f20f8673bbeaff43ad22316", - "build/prefab/lib/mac_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/8c/ea/d02addfdff12637679eb84fc0c76", - "build/prefab/lib/mac_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/3b/3d/cb40316b8f1bcf2be6726e7caa02", - "build/prefab/lib/mac_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/cc/50/4e046e25f8aa45acf1dec45a3ac8", - "build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/0b/0b/3df53fda69cf1bbde139a737155d", - "build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/48/72/2bb9986c42cb3f830622bba48b84", - "build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/cf/55/0266ad6c51ea654700d6e5401942", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/69/cb/33e310a3a4088fd8d01a791a4101", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/29/14/0c633d4d62106e27fad7e93bd1ee", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/f9/6a/02d03767f94811eec30204d75317", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/90/2e/9a54913813513c1d3a44af34bd8a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/bc/20/abfd0ae02083fd0ee86b6d784df7", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/87/bc/b7cc546fda6955c72db6cabc055b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/db/d6/6111b49e4ea15032002dea192c53", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/2d/dd/e753ae37c3c6fdc50c36174d0815", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/2c/50/e3603699f588be2c8b7ae6cff205", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/b5/e9/b781d70aec7b49bd3187b8a02ef1", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/30/84/ec1bd7958c3c3cf1ad03e6f86589", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/9d/92/2ae77825b17795f2d1d70bcac1dd", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/b4/0f/e5d72e7600bc5818c006c658f028", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/c7/b0/33a86aa08a9b1edd5d3d26e15262", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/4f/74/a49c60c973809ddcf2ae9dec6073", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7e/a7/abda25dce865056dc166ecfca2e9", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/a4/7b/eabbc25209be695939db60ef7409", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/24/3b/b28702d0f55ad110b8e9663887ae", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/72/e7/e9412c97c99a20532036fba76d7b", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ec/58/4ba3d50d40de740729c86ae95810", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/45/a9/1ac4d7d839795f2e09ac0b4d4e68", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/45/3a/d41158ccbcebdd1727ab0591dfcd", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/df/35/2b1c111ff32beabbee42cecabeeb", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/c1/5a/3d1e098ee859a1c662e92b8d0b67", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/b7/c0/8ec666b2c97dabfa033a02160770", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/ad/74/963244ff2b75535b0c9b0a52e2c0", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/4c/b6/51bcfd4d329b15c3e445649be7f3", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/52/85/5256ef823fa2b094e01bf8b200a2", + "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/62/0a/6fef094a11fd5b224a95874b7c69", + "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/04/4a/d7b4ec4e2c1883f1d1b9a5f10890", + "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/7b/fb/42fc4858267818a661a5e05dc872", + "build/prefab/lib/linux_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/2e/a1/5e2455f1702504f02dd71f28d02f", + "build/prefab/lib/linux_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/98/ce/d86d1d81529bebccfa92fee552e5", + "build/prefab/lib/linux_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/5e/85/12083068431aa7e3bedea34453a5", + "build/prefab/lib/linux_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/d4/a9/3bff8bceb1a28ddcabb360b92de3", + "build/prefab/lib/linux_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/7c/f1/8d0a9062f6f70137d90144181e2a", + "build/prefab/lib/mac_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/07/62/042121e4fd6dbbf97d1b5b254ddc", + "build/prefab/lib/mac_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/c8/9d/173ce31281dea85251ff225e5019", + "build/prefab/lib/mac_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/9b/da/6a2d46cb948ff75b1db46bd29bc3", + "build/prefab/lib/mac_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ab/16/d9b47b04dfeaf295870152765688", + "build/prefab/lib/mac_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/00/b2/c8ba2a8bbced228db1f3fb68bb87", + "build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/7c/47/5f22179576ac42547cb0e9188ccd", + "build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/e9/62/e2a2d61daea44677fcb81f78b260", + "build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/4b/64/02a635dcbbadd112d416137f558c", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/26/a4/1142109a9a61a566ae218105ec85", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/51/ac/8b8ea4b293632184c2d03cd9df35", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/55/6d/2f61a76b55c1b860648f9a1d7bdf", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/f7/4c/cc176621e68946c0828559490912", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/c8/3c/d55fb3bd4d92547db78a90085b5f", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/1b/ea/10251dc74f1f6e410d1cff169dfb", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/41/01/fcd75c122272e7d9191c8594325f", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/0d/5b/169424eb160c24e01ddd6af0161f", "src/assets/ba_data/python/babase/_mgen/__init__.py": "https://files.ballistica.net/cache/ba1/52/c6/c11130af7b10d6c0321add5518fa", "src/assets/ba_data/python/babase/_mgen/enums.py": "https://files.ballistica.net/cache/ba1/38/c3/1dedd5e74f2508efc5974c8815a1", "src/ballistica/base/mgen/pyembed/binding_base.inc": "https://files.ballistica.net/cache/ba1/ea/6a/6a4721b144e5e297b542d2a0eea2", diff --git a/CHANGELOG.md b/CHANGELOG.md index 592b1bf1..d8796b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.20 (build 21122, api 8, 2023-06-16) +### 1.7.20 (build 21125, api 8, 2023-06-18) - This seems like a good time for a `refactoring` release in anticipation of changes coming in 1.8. Basically this means that a lot of things will be @@ -352,6 +352,10 @@ newer simpler one is now available from `babase.user_agent_string()`. It looks like `Ballistica/1.7.20`. If OS version or platform or whatever else needs to be communicated to a server, it should be passed explicitly as extra data. +- (build 21124) Changed debug-prints for connectivity and v2-transport stuff to + use log calls instead of prints. The environment vars to enable them are now + `BA_DEBUG_LOG_CONNECTIVITY` and `BA_DEBUG_LOG_V2_TRANSPORT`. Set either to '1' + to enable debug logging. ### 1.7.19 (build 20997, api 7, 2023-01-19) diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 896ebfcb..7f3c3b70 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -28,7 +28,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21122 +TARGET_BALLISTICA_BUILD = 21125 TARGET_BALLISTICA_VERSION = '1.7.20' _g_env_config: EnvConfig | None = None diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index 3eeb7778..b8914d76 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -65,6 +65,7 @@ BaseFeatureSet::BaseFeatureSet() audio_server{new AudioServer()}, assets{new Assets()}, app_mode_{AppModeEmpty::GetSingleton()}, + basn_log_behavior_{g_core->platform->GetEnv("BASNLOG") == "1"}, stdio_console{g_buildconfig.enable_stdio_console() ? new StdioConsole() : nullptr} { // We're a singleton. If there's already one of us, something's wrong. @@ -480,7 +481,6 @@ void BaseFeatureSet::V1CloudLog(const std::string& msg) { // handle this. It will group log messages intelligently and ship them // to the master server with various other context info included. - // We currently need both plus and classic for this system to function. if (!IsBaseCompletelyImported()) { printf( "WARNING: V1CloudLog called before babase import complete; will be " @@ -488,13 +488,17 @@ void BaseFeatureSet::V1CloudLog(const std::string& msg) { return; } + // PushCall functionality requires the app to be running. if (app_running_) { python->objs().PushCall(BasePython::ObjID::kHandleV1CloudLogCall); } else { if (HavePlus()) { // For log messages before that time we ship them immediately since // we don't know if the Python layer is (or will be) able to. - if (g_early_v1_cloud_log_writes > 0) { + // NOTE: Currently short-circuiting this for basn to avoid + // shipping early logs that have no errors/warnings. Should clean + // this up. + if (g_early_v1_cloud_log_writes > 0 && !basn_log_behavior_) { g_early_v1_cloud_log_writes -= 1; std::string logprefix = "EARLY-LOG:"; std::string logsuffix; diff --git a/src/ballistica/base/base.h b/src/ballistica/base/base.h index 15b88058..5cb3225c 100644 --- a/src/ballistica/base/base.h +++ b/src/ballistica/base/base.h @@ -745,6 +745,7 @@ class BaseFeatureSet : public FeatureSetNativeComponent, bool called_run_app_to_completion_{}; bool base_import_completed_{}; bool base_native_import_completed_{}; + bool basn_log_behavior_{}; }; } // namespace ballistica::base diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 171388c1..56164855 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21122; +const int kEngineBuildNumber = 21125; const char* kEngineVersion = "1.7.20"; auto MonolithicMain(const core::CoreConfig& core_config) -> int { diff --git a/tools/efro/log.py b/tools/efro/log.py index 080dd98d..30eed928 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -354,6 +354,7 @@ class LogHandler(logging.Handler): self._echofile.write(f'{ends[0]}{msg}{ends[1]}\n') else: self._echofile.write(f'{msg}\n') + self._echofile.flush() if __debug__: echotime = time.monotonic()