diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 0c9596f151ef0e7d68fe60ffb78037bc25265544
parent cb8fa8947d3d715c59e350fc16b74117642278f2
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun, 26 Jun 2022 21:39:17 +0200

feat(lttng): replace more stderr logs with tracepoints

Diffstat:
Msrc/utils.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/utils.c b/src/utils.c @@ -168,7 +168,7 @@ char* unfold(const char* str) { char* res = strtok(strcp, "\n"); if (res == NULL) { - //fprintf(stderr, "No more lines in multiline string, stop unfolding.\n"); + tracepoint(diary, debug, "No more lines in multiline string, stop unfolding"); free(strcp); return NULL; } @@ -304,7 +304,7 @@ void fpath(const char* dir, size_t dir_size, const struct tm* date, char** rpath { // check size of result path if (dir_size + 1 > rpath_size) { - fprintf(stderr, "Directory path too long"); + tracepoint(diary, error, "Directory path too long"); *rpath = NULL; return; } @@ -316,7 +316,7 @@ void fpath(const char* dir, size_t dir_size, const struct tm* date, char** rpath if (dir[dir_size - 1] != '/') { // check size again to accommodate '/' if (dir_size + 1 > rpath_size) { - fprintf(stderr, "Directory path too long"); + tracepoint(diary, error, "Directory path too long"); *rpath = NULL; return; } @@ -328,7 +328,7 @@ void fpath(const char* dir, size_t dir_size, const struct tm* date, char** rpath // append date to the result path if (strlen(*rpath) + strlen(dstr) > rpath_size) { - fprintf(stderr, "File path too long"); + tracepoint(diary, error, "File path too long"); *rpath = NULL; return; }