libircbot
library providing a framework for implementing an IRC bot
Loading...
Searching...
No Matches
log.h File Reference

declarations for the IBLog static class More...

#include <ircbot/decl.h>
#include <stdio.h>

Go to the source code of this file.

Macros

#define MAXLOGLINE   16384
 maximum length for a log line
 

Typedefs

typedef void(* IBLogWriter) (IBLogLevel level, const char *message, void *data)
 A log writer. More...
 

Enumerations

enum  IBLogLevel {
  L_FATAL , L_ERROR , L_WARNING , L_INFO ,
  L_DEBUG
}
 Logging level log.h <ircbot/log.h> More...
 

Detailed Description

declarations for the IBLog static class

Typedef Documentation

◆ IBLogWriter

typedef void(* IBLogWriter) (IBLogLevel level, const char *message, void *data)

A log writer.

This function is responsible to write a processed log message to its ultimate target, like e.g. a logfile.

Parameters
levelthe log level of the message.
messagethe message to write
dataoptional additional context for the log writer

Enumeration Type Documentation

◆ IBLogLevel

enum IBLogLevel

Logging level log.h <ircbot/log.h>

Enumerator
L_FATAL 

program execution can't continue

L_ERROR 

an error message, can't successfully complete

L_WARNING 

a warning message, something seems wrong

L_INFO 

an information message

L_DEBUG 

a debugging message, very verbose