libonion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
log.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <libgen.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <syslog.h>
#include <unistd.h>
#include "log.h"

Functions

void onion_log_syslog (onion_log_level level, const char *filename, int lineno, const char *fmt,...)
 Performs the log to the syslog.
void onion_log_stderr (onion_log_level level, const char *filename, int lineno, const char *fmt,...)
 Logs to stderr.It can be affected also by the environment variable ONION_LOG, with one or several of:

Variables

int onion_log_flags = 0
void(* onion_log )(onion_log_level level, const char *filename, int lineno, const char *fmt,...) = onion_log_stderr
 Logs a message to the log facility.Normally to stderr, but can be set to your own logger or to use syslog.

Variable Documentation

int onion_log_flags = 0