diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-17 13:02:25 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-18 09:00:21 -0700 |
commit | f9f4a9c232357c3967394e8f6a64f9aa36430a45 (patch) | |
tree | 5a49489115fa788385daff5d42fe936231f352b7 /core/profile.c | |
parent | 47506028ca81be864b4cf2f6b87b8e81d18052bc (diff) | |
download | subsurface-f9f4a9c232357c3967394e8f6a64f9aa36430a45.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'core/profile.c')
-rw-r--r-- | core/profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/profile.c b/core/profile.c index 6914b8301..109ec4508 100644 --- a/core/profile.c +++ b/core/profile.c @@ -318,7 +318,7 @@ int get_cylinder_index(const struct dive *dive, const struct event *ev) * We now match up gas change events with their cylinders at dive * event fixup time. */ - fprintf(stderr, "Still looking up cylinder based on gas mix in get_cylinder_index()!\n"); + SSRF_INFO("Still looking up cylinder based on gas mix in get_cylinder_index()!\n"); mix = get_gasmix_from_event(dive, ev); best = find_best_gasmix_match(mix, &dive->cylinders); @@ -1056,7 +1056,7 @@ void calculate_deco_information(struct deco_state *ds, const struct deco_state * entry->ambpressure = depth_to_bar(entry->depth, dive); entry->gfline = get_gf(ds, entry->ambpressure, dive) * (100.0 - AMB_PERCENTAGE) + AMB_PERCENTAGE; if (t0 > t1) { - fprintf(stderr, "non-monotonous dive stamps %d %d\n", t0, t1); + SSRF_INFO("non-monotonous dive stamps %d %d\n", t0, t1); int xchg = t1; t1 = t0; t0 = xchg; |