BT_LOG_WRITE_ERRNO(): use `_msg ": %s" _fmt` format
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 19 Jun 2017 23:01:17 +0000 (19:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Jul 2017 20:05:42 +0000 (16:05 -0400)
commitc4f13c31643dc679b842baff1915f186c03177e5
treeee35966cdf41866feea6ae47fde9be01c35237d1
parent90bd5941399f62f7792d6f22103f2c0aaa913e25
BT_LOG_WRITE_ERRNO(): use `_msg ": %s" _fmt` format

Do not put a period at the end of the errno string: this gives the
opportunity to the user to follow the errno string with a colon, a
space, and fields, e.g.:

    BT_LOGE_ERRNO("Cannot write to file", ": filename=\"%s\"", filename);

which would print this message, for example:

    Cannot write to file: No space left on device: filename="/tmp/my-file"

You can also terminate a field-less message with a period manually:

    BT_LOGE_ERRNO("Cannot close file", ".");

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/logging-internal.h
This page took 0.02385 seconds and 4 git commands to generate.