tree-wide: improve logging

parent 4110345b
...@@ -325,7 +325,7 @@ static int lxc_attach_set_environment(struct lxc_proc_context_info *init_ctx, ...@@ -325,7 +325,7 @@ static int lxc_attach_set_environment(struct lxc_proc_context_info *init_ctx,
ret = putenv("container=lxc"); ret = putenv("container=lxc");
if (ret < 0) if (ret < 0)
return log_warn(-1, errno, "Failed to set environment variable"); return log_warn(-1, "Failed to set environment variable");
/* Set container environment variables.*/ /* Set container environment variables.*/
if (init_ctx && init_ctx->container && init_ctx->container->lxc_conf) { if (init_ctx && init_ctx->container && init_ctx->container->lxc_conf) {
......
...@@ -510,10 +510,10 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ ...@@ -510,10 +510,10 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
__ret__; \ __ret__; \
}) })
#define log_warn(__ret__, __errno__, format, ...) \ #define log_warn(__ret__, format, ...) \
({ \ ({ \
WARN(format, ##__VA_ARGS__); \ WARN(format, ##__VA_ARGS__); \
__ret__; \ __ret__; \
}) })
#define log_debug_errno(__ret__, __errno__, format, ...) \ #define log_debug_errno(__ret__, __errno__, format, ...) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment