1#ifndef POSER_CORE_LOG_H
2#define POSER_CORE_LOG_H
30#define PSC_MAXLOGLINE 16384
50 const char *message,
void *data)
150 ATTR_NONNULL((2)) ATTR_FORMAT((printf, 2, 3));
void PSC_Log_setSilent(int silent)
Enable/disable silent mode.
void PSC_Log_setAsync(int async)
Enable/disable asynchronous logging.
void PSC_Log_setFileLogger(FILE *file)
Use a standard file logger.
void PSC_Log_fmt(PSC_LogLevel level, const char *format,...)
Log a message using a prinft-like format string.
void PSC_Log_setSyslogLogger(const char *ident, int facility, int withStderr)
Use a standard syslog loggeer.
void PSC_Log_msg(PSC_LogLevel level, const char *message)
Log a message.
int PSC_Log_enabled(PSC_LogLevel level)
Check whether log level is enabled.
void PSC_Log_setMaxLogLevel(PSC_LogLevel level)
Set maximum log level.
void PSC_Log_setCustomLogger(PSC_LogWriter writer, void *data)
Use a custom log writer.
void(* PSC_LogWriter)(PSC_LogLevel level, const char *message, void *data)
A log writer.
Definition: log.h:49
PSC_LogLevel
Log levels.
Definition: log.h:35
@ PSC_L_ERROR
error condition, something can't complete
Definition: log.h:37
@ PSC_L_INFO
info logging to see what the service does
Definition: log.h:39
@ PSC_L_DEBUG
verbose debugging messages
Definition: log.h:40
@ PSC_L_FATAL
fatal condition, service must abort
Definition: log.h:36
@ PSC_L_WARNING
something seems wrong and should get attention
Definition: log.h:38