2
* Copyright (c) 2012-2014 Piotr Sipika; see the AUTHORS file for more.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
* See the COPYRIGHT file for more information.
21
#ifndef LXWEATHER_LOGUTIL_HEADER
22
#define LXWEATHER_LOGUTIL_HEADER
37
* Initializes the logging subsystem
39
* @param pczPath Path to a file to log to (can be NULL for std{out|err},
40
* or 'syslog' for syslog)
42
void initializeLogUtil(const char * pczPath);
45
* Cleans up the logging subsystem
48
void cleanupLogUtil();
51
* Logs the message using the specified level.
53
* @param level The level to log at
54
* @param pczMsg Message to log
56
void logUtil(LXWEATHER_LOGLEVEL level, const char * pczMsg, ...);
59
* Sets the maximum allowed log level
61
* @param level The level to use for all messages to follow.
63
* @return Previous value of the maximum log level.
65
LXWEATHER_LOGLEVEL setMaxLogLevel(LXWEATHER_LOGLEVEL level);
68
#define LXW_LOG(level, fmt, args...) logUtil(level, fmt, ##args)
70
#define LXW_LOG(level, fmt, args...)