]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
log: add log level string prefix to logging functions
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 11 Mar 2022 14:51:09 +0000 (07:51 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 11 Mar 2022 14:51:15 +0000 (07:51 -0700)
commit97a0e195ddd780795674e0c1672cdfb5c3e86a0e
tree37b8d637f86ddf8c0b2cbf15fa127dcab6615dd0
parent182b24a3831ea544b06af987bb5824926219945a
log: add log level string prefix to logging functions

Usage of cgroup_{err, warn, info} functions, expects the log level to be
prefixed to the message like: cgroup_warn("Warning: ...").  This patch
removes this need to prefix and automatically adds the desired prefix to
the logger function, so the usage becomes cgroup_warn("...").  This
helps in readability and avoiding typos in setting the right log level
string to the message.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/libcgroup-internal.h
src/tools/tools-common.h