Skip to content
Snippets Groups Projects
Commit 469c63fc authored by Morris Jette's avatar Morris Jette
Browse files

Add function to report current logging level

Add get_log_level() function to return the highest LOG_LEVEL_* used
for any logging mechanism.
parent 9c4eabed
No related branches found
No related tags found
No related merge requests found
...@@ -1407,3 +1407,15 @@ dump_cleanup_list(void) ...@@ -1407,3 +1407,15 @@ dump_cleanup_list(void)
} }
slurm_mutex_unlock(&fatal_lock); slurm_mutex_unlock(&fatal_lock);
} }
/* Return the highest LOG_LEVEL_* used for any logging mechanism.
* For example, if LOG_LEVEL_INFO is returned, we know that all verbose and
* debug type messages will be ignored. */
extern int get_log_level(void)
{
int level;
level = MAX(log->opt.syslog_level, log->opt.logfile_level);
level = MAX(level, log->opt.stderr_level);
return level;
}
...@@ -240,6 +240,11 @@ void log_flush(void); ...@@ -240,6 +240,11 @@ void log_flush(void);
*/ */
extern void log_set_debug_flags(void); extern void log_set_debug_flags(void);
/* Return the highest LOG_LEVEL_* used for any logging mechanism.
* For example, if LOG_LEVEL_INFO is returned, we know that all verbose and
* debug type messages will be ignored. */
extern int get_log_level(void);
/* /*
* the following log a message to the log facility at the appropriate level: * the following log a message to the log facility at the appropriate level:
* *
......
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