From: Jonathan McDowell Date: Tue, 7 Jun 2016 12:49:59 +0000 (+0100) Subject: Add getlogthreshold() to obtain current log level setting X-Git-Tag: onak-0.5.0~29 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=252f4d4b16eee6e61f0675f65069216cc37805c4;p=onak.git Add getlogthreshold() to obtain current log level setting --- diff --git a/log.c b/log.c index 7b17cb0..8ab5e96 100644 --- a/log.c +++ b/log.c @@ -111,6 +111,17 @@ loglevels setlogthreshold(loglevels loglevel) return oldlevel; } +/* + * getlogthreshold - get the threshold for log output + * + * Returns the threshold for log output; anything logged with a log level + * lower than this will be silently dropped. + */ +loglevels getlogthreshold(void) +{ + return logthres; +} + /* * vflog - write a log entry to an already opened log file. * @logfile: The FILE * handle of the open log file. diff --git a/log.h b/log.h index 77770bc..867d6ea 100644 --- a/log.h +++ b/log.h @@ -88,6 +88,14 @@ void cleanuplogthing(void); */ loglevels setlogthreshold(loglevels loglevel); +/* + * getlogthreshold - get the threshold for log output + * + * Returns the threshold for log output; anything logged with a log level + * lower than this will be silently dropped. + */ +loglevels getlogthreshold(void); + /* * logthing - output a log entry * @loglevel: The level of the log.