ui: fix raylib init spam (#36947)

* lil more

* not none

* don't need that either

* too spammy now?
This commit is contained in:
Adeeb Shihadeh
2025-12-21 16:21:35 -08:00
committed by GitHub
parent 8728c7dde3
commit 31ec0096e4
3 changed files with 7 additions and 6 deletions

2
Jenkinsfile vendored
View File

@@ -22,7 +22,7 @@ shopt -s huponexit # kill all child processes when the shell exits
export CI=1
export PYTHONWARNINGS=error
export LOGPRINT=debug
#export LOGPRINT=debug # this has gotten too spammy...
export TEST_DIR=${env.TEST_DIR}
export SOURCE_DIR=${env.SOURCE_DIR}
export GIT_BRANCH=${env.GIT_BRANCH}

View File

@@ -192,6 +192,8 @@ class MouseState:
class GuiApplication:
def __init__(self, width: int | None = None, height: int | None = None):
self._set_log_callback()
self._fonts: dict[FontWeight, rl.Font] = {}
self._width = width if width is not None else GuiApplication._default_width()
self._height = height if height is not None else GuiApplication._default_height()
@@ -215,7 +217,6 @@ class GuiApplication:
self._last_fps_log_time: float = time.monotonic()
self._frame = 0
self._window_close_requested = False
self._trace_log_callback = None
self._modal_overlay = ModalOverlay()
self._modal_overlay_shown = False
self._modal_overlay_tick: Callable[[], None] | None = None
@@ -260,9 +261,6 @@ class GuiApplication:
signal.signal(signal.SIGINT, _close)
atexit.register(self.close)
self._set_log_callback()
rl.set_trace_log_level(rl.TraceLogLevel.LOG_WARNING)
flags = rl.ConfigFlags.FLAG_MSAA_4X_HINT
if ENABLE_VSYNC:
flags |= rl.ConfigFlags.FLAG_VSYNC_HINT
@@ -640,6 +638,9 @@ class GuiApplication:
else:
cloudlog.error(f"raylib: Unknown level {log_level}: {text_str}")
# ensure we get all the logs forwarded to us
rl.set_trace_log_level(rl.TraceLogLevel.LOG_DEBUG)
# Store callback reference
self._trace_log_callback = trace_log_callback
rl.set_trace_log_callback(self._trace_log_callback)

View File

@@ -48,7 +48,7 @@ class Multilang:
translation = gettext.GNUTranslations(fh)
translation.install()
self._translation = translation
cloudlog.warning(f"Loaded translations for language: {self._language}")
cloudlog.debug(f"Loaded translations for language: {self._language}")
except FileNotFoundError:
cloudlog.error(f"No translation file found for language: {self._language}, using default.")
gettext.install('app')