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 21:26:38 +0000 (17:26 -0400)
commitad844560b3dd0323a6f503e97b65a4d124fafddc
tree97a09f415bf77d18c2fd30c3f8e8c97e58fcf9d0
parentd229f56b8df128813b6b3fb155deaf2ce015aa72
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.029212 seconds and 4 git commands to generate.