poser
A C framework for POsix SERvices
Loading...
Searching...
No Matches
log.h File Reference

declarations for the PSC_Log class More...

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

Go to the source code of this file.

Macros

#define PSC_MAXLOGLINE   16384
 Maximum lenght for a log message.
 

Typedefs

typedef void(* PSC_LogWriter) (PSC_LogLevel level, const char *message, void *data)
 A log writer.
 

Enumerations

enum  PSC_LogLevel {
  PSC_L_FATAL , PSC_L_ERROR , PSC_L_WARNING , PSC_L_INFO ,
  PSC_L_DEBUG
}
 Log levels. More...
 

Detailed Description

declarations for the PSC_Log class

Macro Definition Documentation

◆ PSC_MAXLOGLINE

#define PSC_MAXLOGLINE   16384

Maximum lenght for a log message.

This is the maximum length that can safely be used for a single log message.

Typedef Documentation

◆ PSC_LogWriter

typedef void(* PSC_LogWriter) (PSC_LogLevel level, const char *message, void *data)

A log writer.

Called for any log message to actually write it somewhere.

Parameters
levelthe log level
messagethe log message
dataoptional context data for the writer

Enumeration Type Documentation

◆ PSC_LogLevel

Log levels.

Enumerator
PSC_L_FATAL 

fatal condition, service must abort

PSC_L_ERROR 

error condition, something can't complete

PSC_L_WARNING 

something seems wrong and should get attention

PSC_L_INFO 

info logging to see what the service does

PSC_L_DEBUG 

verbose debugging messages