log4c.c File Reference

#include "logging.h"
#include "log4c.h"
#include "macros.h"
#include <errno.h>
#include <stdarg.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Functions

int _log_initCat (int priority, struct LogCategory *category)
 This gets called the first time a category is referenced and performs the initialization.
void _log_logEvent (struct LogCategory *category, struct LogEvent *ev,...)
struct LogCategory _LOGV (LOG_ROOT_CAT)
 Logging for C - implementation.
static const char * initCategory (struct LogCategory *category)
void log_setAppender (struct LogCategory *cat, struct LogAppender *app)
 Sets the category's appender.
void log_setParent (struct LogCategory *cat, struct LogCategory *parent)
 Programatically alter a category's parent.
void log_setThreshold (struct LogCategory *cat, int thresholdPriority)
 Programatically alters a category's threshold priority.
static void setInheritedThresholds (struct LogCategory *cat)


Function Documentation

int _log_initCat ( int  priority,
struct LogCategory category 
)

This gets called the first time a category is referenced and performs the initialization.

Also resets threshold to inherited!

Definition at line 126 of file log4c.c.

void _log_logEvent ( struct LogCategory category,
struct LogEvent ev,
  ... 
)

Definition at line 92 of file log4c.c.

struct LogCategory _LOGV ( LOG_ROOT_CAT   )  [read]

Logging for C - implementation.

See log4c.h for documentation.

static const char* initCategory ( struct LogCategory category  )  [static]

Definition at line 109 of file log4c.c.

References _LOGV, LogCategory::appender, log_defaultLogAppender, LOG_ROOT_CAT, log_setParent(), LP_UNINITIALIZED, LP_WARNING, LogCategory::parent, and LogCategory::thresholdPriority.

Referenced by _log_initCat(), and log_setParent().

void log_setAppender ( struct LogCategory cat,
struct LogAppender app 
)

Sets the category's appender.

Definition at line 190 of file log4c.c.

void log_setParent ( struct LogCategory cat,
struct LogCategory parent 
)

Programatically alter a category's parent.

Definition at line 133 of file log4c.c.

Referenced by initCategory().

void log_setThreshold ( struct LogCategory cat,
int  thresholdPriority 
)

Programatically alters a category's threshold priority.

Definition at line 173 of file log4c.c.

Referenced by main().

static void setInheritedThresholds ( struct LogCategory cat  )  [static]

Definition at line 161 of file log4c.c.

References LogCategory::firstChild, LogCategory::isThreshInherited, LogCategory::nextSibling, and LogCategory::thresholdPriority.

Referenced by log_setThreshold().


Generated on Fri Sep 28 00:35:47 2007 for raceintospace by  doxygen 1.5.3