mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
logging/trivial: rename _nm_log() to _nm_log_impl()
The actual logging implementation is not supposed to be called
directly, because there are macros that capture the call site
information __FILE__, __LINE__, and G_STRFUNC.
Rename the function to make clear that this is the actual
implementation.
(cherry picked from commit 211d241ab0)
Conflicts:
src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h
This commit is contained in:
parent
97f9b03119
commit
96c3f7b39f
3 changed files with 18 additions and 18 deletions
|
|
@ -57,7 +57,7 @@ G_STMT_START { \
|
||||||
if (nm_logging_enabled (_l, LOGD_DHCP)) { \
|
if (nm_logging_enabled (_l, LOGD_DHCP)) { \
|
||||||
const char *_location = strrchr (file "", '/'); \
|
const char *_location = strrchr (file "", '/'); \
|
||||||
\
|
\
|
||||||
_nm_log (_location ? _location + 1 : file, line, func, _l, LOGD_DHCP, 0, format, ## __VA_ARGS__); \
|
_nm_log_impl (_location ? _location + 1 : file, line, func, _l, LOGD_DHCP, 0, format, ## __VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -357,14 +357,14 @@ nm_logging_enabled (NMLogLevel level, NMLogDomain domain)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_nm_log (const char *file,
|
_nm_log_impl (const char *file,
|
||||||
guint line,
|
guint line,
|
||||||
const char *func,
|
const char *func,
|
||||||
NMLogLevel level,
|
NMLogLevel level,
|
||||||
NMLogDomain domain,
|
NMLogDomain domain,
|
||||||
int error,
|
int error,
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char *msg;
|
char *msg;
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ typedef enum { /*< skip >*/
|
||||||
#define nm_log(level, domain, ...) \
|
#define nm_log(level, domain, ...) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (nm_logging_enabled ((level), (domain))) { \
|
if (nm_logging_enabled ((level), (domain))) { \
|
||||||
_nm_log (__FILE__, __LINE__, G_STRFUNC, (level), (domain), 0, ""__VA_ARGS__); \
|
_nm_log_impl (__FILE__, __LINE__, G_STRFUNC, (level), (domain), 0, ""__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
|
|
@ -136,14 +136,14 @@ typedef enum { /*< skip >*/
|
||||||
nm_log_ptr ((level), (domain), (self), __VA_ARGS__)
|
nm_log_ptr ((level), (domain), (self), __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
void _nm_log (const char *file,
|
void _nm_log_impl (const char *file,
|
||||||
guint line,
|
guint line,
|
||||||
const char *func,
|
const char *func,
|
||||||
NMLogLevel level,
|
NMLogLevel level,
|
||||||
NMLogDomain domain,
|
NMLogDomain domain,
|
||||||
int error,
|
int error,
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
...) __attribute__((__format__ (__printf__, 7, 8)));
|
...) __attribute__((__format__ (__printf__, 7, 8)));
|
||||||
|
|
||||||
const char *nm_logging_level_to_string (void);
|
const char *nm_logging_level_to_string (void);
|
||||||
const char *nm_logging_domains_to_string (void);
|
const char *nm_logging_domains_to_string (void);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue