X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=log.c;h=8ab5e96526b916283efe06e01b966c9eed7534d0;hb=33e8f4970e2a6cfb98820e32b8a125061c2013d9;hp=bb7461b67ec3374d1150fb429e985800c2bf7df5;hpb=394938c479925750ffe56c28d281945ba4003a14;p=onak.git diff --git a/log.c b/log.c index bb7461b..8ab5e96 100644 --- a/log.c +++ b/log.c @@ -1,9 +1,20 @@ /* * log.c - Simple logging framework. * - * Jonathan McDowell + * Copyright 2003 Jonathan McDowell * - * 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, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include @@ -100,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.