Emit function/line number in debugging

This commit is contained in:
Philip Prindeville 2024-01-21 10:51:49 -07:00 committed by Olof Hagsand
parent 88b60daa75
commit c9dbece32b

View file

@ -167,6 +167,7 @@ clixon_debug_fn(clixon_handle h,
fprintf(stderr, "cbuf_new: %s\n", strerror(errno)); fprintf(stderr, "cbuf_new: %s\n", strerror(errno));
goto done; goto done;
} }
cprintf(cb, "%s:%d: ", fn, line);
va_start(ap, format); va_start(ap, format);
vcprintf(cb, format, ap); vcprintf(cb, format, ap);
va_end(ap); va_end(ap);