File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -539,7 +539,19 @@ fn rr_recording_stream_new_impl(
539539 re_log:: setup_logging ( ) ;
540540 if cfg ! ( debug_assertions) {
541541 re_crash_handler:: install_crash_handlers ( re_build_info:: build_info!( ) ) ;
542- re_log:: warn!( "Using a DEBUG BUILD of the Rerun SDK with Rerun crash handlers!" ) ;
542+
543+ // Log a clear warning to inform users that (accidentally) use a debug build of the SDK.
544+ // This should however _never_ cause a panic if RERUN_PANIC_ON_WARN is set, e.g. in test environments.
545+ const DEBUG_BUILD_WARNING : & str =
546+ "Using a DEBUG BUILD of the Rerun SDK with Rerun crash handlers!" ;
547+ let can_log_warning = std:: env:: var ( "RERUN_PANIC_ON_WARN" )
548+ . map ( |value| value == "0" )
549+ . unwrap_or ( true ) ;
550+ if can_log_warning {
551+ re_log:: warn!( DEBUG_BUILD_WARNING ) ;
552+ } else {
553+ re_log:: info!( DEBUG_BUILD_WARNING ) ;
554+ }
543555 }
544556 } ) ;
545557 }
You can’t perform that action at this time.
0 commit comments