diff options
author | John Levon <john.levon@nutanix.com> | 2021-04-07 09:54:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 09:54:00 +0100 |
commit | 293e1a92ffdbd794c3e23f528589e532b9b1e73a (patch) | |
tree | b84f7dfabdf0c1d19119e9f537ffe3557eaed459 /include | |
parent | ed6deba2b8a496e5c3047d3d46208109ac762e4b (diff) | |
download | libvfio-user-293e1a92ffdbd794c3e23f528589e532b9b1e73a.zip libvfio-user-293e1a92ffdbd794c3e23f528589e532b9b1e73a.tar.gz libvfio-user-293e1a92ffdbd794c3e23f528589e532b9b1e73a.tar.bz2 |
clean up newlines in logs (#423)
vfu_log() and err() should not take newlines.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libvfio-user.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h index 90dd21a..a43f38a 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -181,7 +181,8 @@ vfu_get_private(vfu_ctx_t *vfu_ctx); typedef void (vfu_log_fn_t)(vfu_ctx_t *vfu_ctx, int level, const char *msg); /** - * Log to the logging function configured for this context. + * Log to the logging function configured for this context. The format should + * not include a new line. */ void vfu_log(vfu_ctx_t *vfu_ctx, int level, const char *fmt, ...) \ @@ -192,6 +193,9 @@ vfu_log(vfu_ctx_t *vfu_ctx, int level, const char *fmt, ...) \ * @vfu_ctx: the libvfio-user context * @log: logging function * @level: logging level as defined in syslog(3) + * + * The log handler is expected to add a newline (that is, log messages do not + * include a newline). */ int vfu_setup_log(vfu_ctx_t *vfu_ctx, vfu_log_fn_t *log, int level); |