Skip to content
Snippets Groups Projects
Commit 1ae9eedc authored by Tim Wickberg's avatar Tim Wickberg
Browse files

Change log_flag() to log at verbose level and prepend flag name.

Logging at the verbose() level keeps messages out of the user commands
by default (unless -v was requested), which minimizes disruption from
adding additional debugging messages in to the network and RPC layers.

Prepending the debug flag helps identify which messages have been enabled
by a given flag, which is useful when tracing a given subsystem. A log of
associated messages have given hints to this, but making this consistent
with associated cleanup (to come) should simplify tracing when necessary.

Bug 8227.
parent 11f8fa91
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,9 @@ HIGHLIGHTS
-- The example systemd unit files have been changed to the "simple" type of
operation, and the daemon will now run in the foreground within systemd
instead of daemonizing itself.
-- Log messages enabled by the various DebugFlags have been overhauled, and
will all print at the verbose() level, and prepend the flag name that is
associated with a given log message.
CONFIGURATION FILE CHANGES (see man appropriate man page for details)
=====================================================================
......
......@@ -551,9 +551,9 @@ The default value is "cred/munge" and is the recommended.
\fBDebugFlags\fR
Defines specific subsystems which should provide more detailed event logging.
Multiple subsystems can be specified with comma separators.
Most DebugFlags will result in verbose logging for the identified subsystems
and could impact performance.
Valid subsystems available today (with more to come) include:
Most DebugFlags will result in verbose-level logging for the identified
subsystems, and could impact performance.
Valid subsystems available include:
.RS
.TP 17
\fBAccrue\fR
......
......@@ -338,7 +338,8 @@ void spank_log(const char *, ...) __attribute__ ((format (printf, 1, 2)));
#define log_flag(flag, fmt, ...) \
do { \
if (slurmctld_conf.debug_flags & DEBUG_FLAG_##flag) \
log_var(LOG_LEVEL_INFO, fmt, ##__VA_ARGS__); \
log_var(LOG_LEVEL_VERBOSE, #flag ": " fmt, \
##__VA_ARGS__); \
} while (0)
#endif /* !_LOG_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment