/*
* log.c - Simple logging framework.
*
- * Jonathan McDowell <noodles@earth.li>
+ * Copyright 2003 Jonathan McDowell <noodles@earth.li>
*
- * Copyright 2003 Project Purple
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdarg.h>
* logs - if we're asked to log something below this level we won't output
* it.
*/
-static loglevels logthres = LOGTHING_DEBUG;
+static loglevels logthres = LOGTHING_NOTICE;
/*
* logappname - the name of the application using us.
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.