From f9f4a9c232357c3967394e8f6a64f9aa36430a45 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 17 Apr 2020 13:02:25 -0700 Subject: debug output: ensure our debug output is captured on Android I would have bet money that Android used to send stderr to the logcat log, but apparently it doesn't (anymore?). So in order to be able to have a chance to debug weird cloud storage issues on Android, let's do some wholesale replacement of fprintf(stderr,...) with our own version of the INFO macro that we long ago borrowed from libdivecomputer (and rename it to ensure we don't have a conflict there). Signed-off-by: Dirk Hohndel --- core/trip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/trip.c') diff --git a/core/trip.c b/core/trip.c index 6e7c4653d..070d05a21 100644 --- a/core/trip.c +++ b/core/trip.c @@ -4,6 +4,7 @@ #include "subsurface-string.h" #include "selection.h" #include "table.h" +#include "core/qthelper.h" struct trip_table trip_table; @@ -87,7 +88,7 @@ void add_dive_to_trip(struct dive *dive, dive_trip_t *trip) if (dive->divetrip == trip) return; if (dive->divetrip) - fprintf(stderr, "Warning: adding dive to trip that has trip set\n"); + SSRF_INFO("Warning: adding dive to trip that has trip set\n"); insert_dive(&trip->dives, dive); dive->divetrip = trip; } -- cgit v1.2.3-70-g09d2