mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 16:40:37 +01:00
dispatcher: don't print debug messages of dispatcher in regular mode
Previously, we would log several messages with level "debug" / g_info(). _LOG_R_D (request, "start running ordered scripts..."); _LOG_R_D (request, "new request (%u scripts)", request->scripts->len); _LOG_R_D (request, "completed: no scripts"); Note that this effectively logs a message for every event. I think that is to verbose and not suitable for regular logging. Only enable these messages if debug logging is enabled. As such, these debug level messsages now are enabled together with the trace level messages.
This commit is contained in:
parent
dd72696af7
commit
58704a37ae
1 changed files with 4 additions and 3 deletions
|
|
@ -169,17 +169,18 @@ struct Request {
|
|||
} G_STMT_END
|
||||
|
||||
static gboolean
|
||||
_LOG_R_T_enabled (const Request *request)
|
||||
_LOG_R_D_enabled (const Request *request)
|
||||
{
|
||||
return request->debug;
|
||||
}
|
||||
#define _LOG_R_T_enabled(request) _LOG_R_D_enabled (request)
|
||||
|
||||
#define _LOG_R_T(_request, ...) _LOG(_request, NULL, FALSE, g_debug, __VA_ARGS__)
|
||||
#define _LOG_R_D(_request, ...) _LOG(_request, NULL, TRUE, g_info, __VA_ARGS__)
|
||||
#define _LOG_R_D(_request, ...) _LOG(_request, NULL, FALSE, g_info, __VA_ARGS__)
|
||||
#define _LOG_R_W(_request, ...) _LOG(_request, NULL, TRUE, g_warning, __VA_ARGS__)
|
||||
|
||||
#define _LOG_S_T(_script, ...) _LOG(NULL, _script, FALSE, g_debug, __VA_ARGS__)
|
||||
#define _LOG_S_D(_script, ...) _LOG(NULL, _script, TRUE, g_info, __VA_ARGS__)
|
||||
#define _LOG_S_D(_script, ...) _LOG(NULL, _script, FALSE, g_info, __VA_ARGS__)
|
||||
#define _LOG_S_W(_script, ...) _LOG(NULL, _script, TRUE, g_warning, __VA_ARGS__)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue