Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
0c241537
Unverified
Commit
0c241537
authored
Mar 20, 2020
by
Stéphane Graber
Committed by
GitHub
Mar 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3318 from brauner/2020-03-20/fixes
log: fix cmd logging
parents
2570641c
a1162a6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
log.h
src/lxc/log.h
+15
-14
No files found.
src/lxc/log.h
View file @
0c241537
...
@@ -456,27 +456,28 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
...
@@ -456,27 +456,28 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
#endif
#endif
#if HAVE_M_FORMAT
#if HAVE_M_FORMAT
#define CMD_SYSERROR(format, ...) \
#define CMD_SYSERROR(format, ...)
\
fprintf(stderr, "%
m - %s: %d: %s:
" format "\n", __FILE__, __LINE__, \
fprintf(stderr, "%
s: %d: %s - %m -
" format "\n", __FILE__, __LINE__, \
__func__, ##__VA_ARGS__);
__func__, ##__VA_ARGS__);
#else
#else
#define CMD_SYSERROR(format, ...) \
#define CMD_SYSERROR(format, ...)
\
do { \
do {
\
lxc_log_strerror_r; \
lxc_log_strerror_r;
\
fprintf(stderr, "%s
- %s: %d: %s:
" format "\n", __FILE__, \
fprintf(stderr, "%s
: %d: %s - %s -
" format "\n", __FILE__, \
__LINE__, __func__, ptr, ##__VA_ARGS__); \
__LINE__, __func__, ptr, ##__VA_ARGS__);
\
} while (0)
} while (0)
#endif
#endif
#if HAVE_M_FORMAT
#if HAVE_M_FORMAT
#define CMD_SYSINFO(format, ...) \
#define CMD_SYSINFO(format, ...) \
printf("%m - " format, ##__VA_ARGS__)
printf("%s: %d: %s - %m - " format "\n", __FILE__, __LINE__, __func__, \
##__VA_ARGS__);
#else
#else
#define CMD_SYSINFO(format, ...) \
#define CMD_SYSINFO(format, ...)
\
do { \
do {
\
lxc_log_strerror_r; \
lxc_log_strerror_r;
\
prin
ft("%s - %s: %d: %s:
" format "\n", __FILE__, __LINE__, \
prin
tf("%s: %d: %s - %s -
" format "\n", __FILE__, __LINE__, \
__func__, ptr, ##__VA_ARGS__); \
__func__, ptr, ##__VA_ARGS__);
\
} while (0)
} while (0)
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment