X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=log.c;h=45ec17e01bfef44420a52834034043594bfa5982;hp=300f4b8e066cd1269f89466509d171116c0f5841;hb=743957a08f068529d3add3e8485678b4e5034195;hpb=cd002cef518222c140de94b8817874b072b2d918 diff --git a/log.c b/log.c index 300f4b8..45ec17e 100644 --- a/log.c +++ b/log.c @@ -1,11 +1,19 @@ /* * 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. * - * $Id: log.c,v 1.5 2004/03/23 12:33:47 noodles Exp $ + * 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 . */ #include @@ -102,6 +110,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.