galago-log.h File Reference
Log API. More...
#include <stdarg.h>
#include <libgalago/galago-types.h>
Go to the source code of this file.
Defines | |
#define | __attribute__(x) |
Typedefs | |
typedef void(* | GalagoLogHandlerFunc )(GalagoLogLevel, const char *, va_list args, void *) |
Enumerations | |
enum | GalagoLogLevel { GALAGO_LOG_ALL = 0, GALAGO_LOG_MISC, GALAGO_LOG_INFO, GALAGO_LOG_WARNING, GALAGO_LOG_ERROR, GALAGO_LOG_FATAL, GALAGO_LOG_ASSERT, GALAGO_LOG_NUM_LEVELS } |
Log levels. More... | |
Functions | |
void | galago_log_set_enabled (GalagoLogLevel level, galago_bool enabled) |
Sets whether or not log output is enabled for a level. | |
void | galago_log_set_handler (GalagoLogLevel level, GalagoLogHandlerFunc func, void *user_data) |
Sets up a handler for logging information. | |
void | galago_log_unset_handler (GalagoLogLevel level) |
Unsets a logging handler. | |
void | galago_log (GalagoLogLevel level, const char *format,...) |
Outputs log information. | |
void | galago_log_args (GalagoLogLevel level, const char *format, va_list args) |
Outpus log information. | |
void | galago_log_misc (const char *format,...) |
Outputs misc. | |
void | galago_log_info (const char *format,...) |
Outputs info level log information. | |
void | galago_log_warning (const char *format,...) |
Outputs warning level log information. | |
void | galago_log_error (const char *format,...) |
Outputs error level log information. | |
void | galago_log_fatal (const char *format,...) |
Outputs fatal level log information. |
Detailed Description
Log API.
- Copyright:
- (C) 2004-2005 Christian Hammond
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Definition in file galago-log.h.
Enumeration Type Documentation
|
Log levels.
Definition at line 30 of file galago-log.h. |
Function Documentation
|
Outputs log information.
|
|
Outpus log information. This is different from galagoLog() in that it takes a va_list.
|
|
Outputs error level log information. This is a wrapper for galago_log(), and uses GALAGO_LOG_ERROR as the level.
|
|
Outputs fatal level log information. This is a wrapper for galago_log(), and uses GALAGO_LOG_FATAL as the level.
|
|
Outputs info level log information. This is a wrapper for galago_log(), and uses GALAGO_LOG_INFO as the level.
|
|
Outputs misc. level log information. This is a wrapper for galago_log(), and uses GALAGO_LOG_MISC as the level.
|
|
Sets whether or not log output is enabled for a level. If level is GALAGO_LOG_ALL, the enabled state will be set for all levels. The other levels may then be enabled or disabled on a per-level basis.
|
|
Sets up a handler for logging information.
|
|
Unsets a logging handler. This is equivalent to calling galago_log_set_handler(level, func, NULL);
|
|
Outputs warning level log information. This is a wrapper for galago_log(), and uses GALAGO_LOG_WARNING as the level.
|