diff --git a/include/sentry.h b/include/sentry.h index a6ceadc41..16b7e03fc 100644 --- a/include/sentry.h +++ b/include/sentry.h @@ -1068,6 +1068,11 @@ typedef void (*sentry_logger_function_t)( * Sets the sentry-native logger function. * * Used for logging debug events when the `debug` option is set to true. + * + * Note: Multiple threads may invoke your `func`. If you plan to mutate any data + * inside the `userdata` argument after initialization, you must ensure proper + * synchronization inside the logger function. + * */ SENTRY_API void sentry_options_set_logger( sentry_options_t *opts, sentry_logger_function_t func, void *userdata); diff --git a/tests/test_unit.py b/tests/test_unit.py index f75a719d7..3633efec9 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -14,6 +14,9 @@ def test_unit(cmake, unittest): @pytest.mark.skipif(not has_http, reason="tests need http transport") def test_unit_transport(cmake, unittest): + if unittest in ["custom_logger"]: + pytest.skip("excluded from transport test-suite") + cwd = cmake(["sentry_test_unit"], {"SENTRY_BACKEND": "none"}) env = dict(os.environ) run(cwd, "sentry_test_unit", ["--no-summary", unittest], check=True, env=env)