aboutgitcodebugslistschat
path: root/log.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-10-13 15:50:30 +1100
committerStefano Brivio <sbrivio@redhat.com>2023-11-07 09:54:59 +0100
commitc0426ff10bc9dbc9c64f3d32995feb9262c82148 (patch)
treed8dd7d7250dfbc279da393eb24297063e92bad5b /log.h
parent59722031744e76c5619ed5b46b8aae76b01b32ac (diff)
downloadpasst-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar
passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.gz
passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.bz2
passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.lz
passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.xz
passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.tar.zst
passt-c0426ff10bc9dbc9c64f3d32995feb9262c82148.zip
log: Add vlogmsg()
Currently logmsg() is only available as a variadic function. This is fine for normal use, but is awkward if we ever want to write wrappers around it which (for example) add standardised prefix information. To allow that, add a vlogmsg() function which takes a va_list instead, and implement logmsg() in terms of it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'log.h')
-rw-r--r--log.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/log.h b/log.h
index df72f9a..9c38182 100644
--- a/log.h
+++ b/log.h
@@ -12,6 +12,7 @@
#define LOGFILE_CUT_RATIO 30 /* When full, cut ~30% size */
#define LOGFILE_SIZE_MIN (5UL * MAX(BUFSIZ, PAGE_SIZE))
+void vlogmsg(int pri, const char *format, va_list ap);
void logmsg(int pri, const char *format, ...)
__attribute__((format(printf, 2, 3)));