diff --git a/src/backends/sentry_backend_crashpad.cpp b/src/backends/sentry_backend_crashpad.cpp index c89e5e634..08f60d290 100644 --- a/src/backends/sentry_backend_crashpad.cpp +++ b/src/backends/sentry_backend_crashpad.cpp @@ -186,7 +186,7 @@ crashpad_backend_flush_scope_to_event(const sentry_path_t *event_path, sentry_free(mpack); if (rv != 0) { - SENTRY_INFO("flushing scope to msgpack failed"); + SENTRY_WARN("flushing scope to msgpack failed"); } } @@ -545,7 +545,7 @@ crashpad_backend_add_breadcrumb(sentry_backend_t *backend, sentry_free(mpack); if (rv != 0) { - SENTRY_INFO("flushing breadcrumb to msgpack failed"); + SENTRY_WARN("flushing breadcrumb to msgpack failed"); } } diff --git a/src/path/sentry_path_unix.c b/src/path/sentry_path_unix.c index 4b0cc5852..b1b09be43 100644 --- a/src/path/sentry_path_unix.c +++ b/src/path/sentry_path_unix.c @@ -474,7 +474,7 @@ write_buffer_with_flags( int fd = open( path->path, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); if (fd < 0) { - SENTRY_DEBUGF( + SENTRY_WARN( "failed to open file \"%s\" for writing (errno %d, flags %x)", path->path, errno, flags); return 1; diff --git a/src/path/sentry_path_windows.c b/src/path/sentry_path_windows.c index 0e3491a88..7f2980f8f 100644 --- a/src/path/sentry_path_windows.c +++ b/src/path/sentry_path_windows.c @@ -110,7 +110,7 @@ sentry__path_current_exe(void) sentry_path_t *path = path_with_len(MAX_PATH); size_t len = GetModuleFileNameW(NULL, path->path, MAX_PATH); if (!len) { - SENTRY_INFO("unable to get current exe path"); + SENTRY_WARN("unable to get current exe path"); sentry__path_free(path); return NULL; } diff --git a/src/sentry_core.c b/src/sentry_core.c index a9de8b534..355cbfbbe 100644 --- a/src/sentry_core.c +++ b/src/sentry_core.c @@ -120,7 +120,7 @@ sentry_init(sentry_options_t *options) if (options->database_path) { sentry__path_free(database_path); } else { - SENTRY_INFO("falling back to non-absolute database path"); + SENTRY_DEBUG("falling back to non-absolute database path"); options->database_path = database_path; } SENTRY_INFOF("using database path \"%" SENTRY_PATH_PRI "\"", @@ -262,7 +262,7 @@ sentry_close(void) } sentry_options_free(options); } else { - SENTRY_INFO("sentry_close() called, but options was empty"); + SENTRY_WARN("sentry_close() called, but options was empty"); } g_options = NULL; @@ -363,7 +363,7 @@ sentry__capture_envelope( { bool has_consent = !sentry__should_skip_upload(); if (!has_consent) { - SENTRY_DEBUG("discarding envelope due to missing user consent"); + SENTRY_INFO("discarding envelope due to missing user consent"); sentry_envelope_free(envelope); return; } @@ -906,7 +906,7 @@ sentry_transaction_finish_ts( sentry_transaction_t *opaque_tx, uint64_t timestamp) { if (!opaque_tx || sentry_value_is_null(opaque_tx->inner)) { - SENTRY_INFO("no transaction available to finish"); + SENTRY_WARN("no transaction available to finish"); goto fail; } @@ -1029,7 +1029,7 @@ sentry_transaction_start_child_ts_n(sentry_transaction_t *opaque_parent, size_t description_len, const uint64_t timestamp) { if (!opaque_parent || sentry_value_is_null(opaque_parent->inner)) { - SENTRY_INFO("no transaction available to create a child under"); + SENTRY_WARN("no transaction available to create a child under"); return NULL; } sentry_value_t parent = opaque_parent->inner; @@ -1079,11 +1079,11 @@ sentry_span_start_child_ts_n(sentry_span_t *opaque_parent, size_t description_len, uint64_t timestamp) { if (!opaque_parent || sentry_value_is_null(opaque_parent->inner)) { - SENTRY_INFO("no parent span available to create a child span under"); + SENTRY_WARN("no parent span available to create a child span under"); return NULL; } if (!opaque_parent->transaction) { - SENTRY_INFO("no root transaction to create a child span under"); + SENTRY_WARN("no root transaction to create a child span under"); return NULL; } sentry_value_t parent = opaque_parent->inner; @@ -1121,14 +1121,14 @@ void sentry_span_finish_ts(sentry_span_t *opaque_span, uint64_t timestamp) { if (!opaque_span || sentry_value_is_null(opaque_span->inner)) { - SENTRY_INFO("no span to finish"); + SENTRY_WARN("no span to finish"); goto fail; } sentry_transaction_t *opaque_root_transaction = opaque_span->transaction; if (!opaque_root_transaction || sentry_value_is_null(opaque_root_transaction->inner)) { - SENTRY_INFO( + SENTRY_WARN( "no root transaction to finish span on, aborting span finish"); goto fail; } @@ -1143,7 +1143,7 @@ sentry_span_finish_ts(sentry_span_t *opaque_span, uint64_t timestamp) if (!sentry_value_is_null( sentry_value_get_by_key(root_transaction, "timestamp"))) { - SENTRY_INFO("span's root transaction is already finished, aborting " + SENTRY_WARN("span's root transaction is already finished, aborting " "span finish"); goto fail; } @@ -1175,7 +1175,7 @@ sentry_span_finish_ts(sentry_span_t *opaque_span, uint64_t timestamp) } if (!sentry_value_is_null(sentry_value_get_by_key(span, "timestamp"))) { - SENTRY_INFO("span is already finished, aborting span finish"); + SENTRY_WARN("span is already finished, aborting span finish"); sentry_value_decref(span); goto fail; } @@ -1193,7 +1193,7 @@ sentry_span_finish_ts(sentry_span_t *opaque_span, uint64_t timestamp) sentry_value_t spans = sentry_value_get_by_key(root_transaction, "spans"); if (sentry_value_get_length(spans) >= max_spans) { - SENTRY_INFO("reached maximum number of spans for transaction, " + SENTRY_WARN("reached maximum number of spans for transaction, " "discarding span"); sentry_value_decref(span); goto fail; @@ -1260,7 +1260,7 @@ sentry_capture_minidump_n(const char *path, size_t path_len) return; } - SENTRY_INFOF( + SENTRY_DEBUGF( "Capturing minidump \"%" SENTRY_PATH_PRI "\"", dump_path->path); sentry_value_t event = sentry_value_new_event(); diff --git a/src/sentry_database.c b/src/sentry_database.c index e9ced1ad5..e416f49b4 100644 --- a/src/sentry_database.c +++ b/src/sentry_database.c @@ -105,7 +105,7 @@ sentry__run_write_envelope( sentry__path_free(output_path); if (rv) { - SENTRY_INFO("writing envelope to file failed"); + SENTRY_WARN("writing envelope to file failed"); } // the `write_to_path` returns > 0 on failure, but we would like a real bool @@ -131,7 +131,7 @@ sentry__run_write_session( sentry_free(buf); if (rv) { - SENTRY_INFO("writing session to file failed"); + SENTRY_WARN("writing session to file failed"); } return !rv; } @@ -266,7 +266,7 @@ sentry__write_crash_marker(const sentry_options_t *options) sentry__path_free(marker_path); if (rv) { - SENTRY_INFO("writing crash timestamp to file failed"); + SENTRY_WARN("writing crash timestamp to file failed"); } return !rv; } @@ -297,7 +297,7 @@ sentry__clear_crash_marker(const sentry_options_t *options) int rv = sentry__path_remove(marker_path); sentry__path_free(marker_path); if (rv) { - SENTRY_INFO("removing the crash timestamp file has failed"); + SENTRY_WARN("removing the crash timestamp file has failed"); } return !rv; } diff --git a/src/sentry_tracing.c b/src/sentry_tracing.c index 02ca760eb..81684af4f 100644 --- a/src/sentry_tracing.c +++ b/src/sentry_tracing.c @@ -359,7 +359,7 @@ sentry__value_span_new_n(size_t max_spans, sentry_value_t parent, sentry_slice_t operation, sentry_slice_t description, uint64_t timestamp) { if (!sentry_value_is_null(sentry_value_get_by_key(parent, "timestamp"))) { - SENTRY_INFO("span's parent is already finished, not creating span"); + SENTRY_WARN("span's parent is already finished, not creating span"); goto fail; } @@ -368,7 +368,7 @@ sentry__value_span_new_n(size_t max_spans, sentry_value_t parent, // number of max spans. This means that the number of in-flight spans // can exceed the max number of spans. if (sentry_value_get_length(spans) >= max_spans) { - SENTRY_INFO("reached maximum number of spans for transaction, not " + SENTRY_WARN("reached maximum number of spans for transaction, not " "creating span"); goto fail; } diff --git a/src/sentry_transport.c b/src/sentry_transport.c index 93b19537a..414d7c7b6 100644 --- a/src/sentry_transport.c +++ b/src/sentry_transport.c @@ -84,7 +84,7 @@ sentry__transport_send_envelope( return; } if (!transport) { - SENTRY_DEBUG("discarding envelope due to invalid transport"); + SENTRY_WARN("discarding envelope due to invalid transport"); sentry_envelope_free(envelope); return; } @@ -175,7 +175,7 @@ gzipped_with_compression(const char *body, const size_t body_len, int err = deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, MAX_WBITS + 16, 9, Z_DEFAULT_STRATEGY); if (err != Z_OK) { - SENTRY_DEBUGF("deflateInit2 failed: %d", err); + SENTRY_WARNF("deflateInit2 failed: %d", err); return false; } @@ -193,7 +193,7 @@ gzipped_with_compression(const char *body, const size_t body_len, } if (err != Z_STREAM_END) { - SENTRY_DEBUGF("deflate failed: %d", err); + SENTRY_WARNF("deflate failed: %d", err); sentry_free(buffer); buffer = NULL; deflateEnd(&stream); diff --git a/src/transports/sentry_transport_winhttp.c b/src/transports/sentry_transport_winhttp.c index 3e27d4dbf..b72751160 100644 --- a/src/transports/sentry_transport_winhttp.c +++ b/src/transports/sentry_transport_winhttp.c @@ -271,7 +271,7 @@ sentry__winhttp_send_task(void *_envelope, void *_state) sentry__rate_limiter_update_from_429(state->ratelimiter); } } else { - SENTRY_INFOF( + SENTRY_WARNF( "`WinHttpSendRequest` failed with code `%d`", GetLastError()); }