Main Page | Data Structures | File List | Globals | Related Pages

layout.h File Reference

Interface for user specific layout format of log4c_logging_event events. More...

#include <log4c/defs.h>
#include <log4c/logging_event.h>
#include <stdio.h>

Include dependency graph for layout.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  log4c_layout_type
 log4c layout type class More...

Defines

#define log4c_layout_type_define(a_type)

Typedefs

typedef __log4c_layout log4c_layout_t
typedef log4c_layout_type log4c_layout_type_t
 log4c layout type class

Functions

const log4c_layout_type_tlog4c_layout_type_get (const char *a_name)
const log4c_layout_type_tlog4c_layout_type_set (const log4c_layout_type_t *a_type)
log4c_layout_tlog4c_layout_get (const char *a_name)
log4c_layout_tlog4c_layout_new (const char *a_name)
void log4c_layout_delete (log4c_layout_t *a_layout)
const char * log4c_layout_get_name (const log4c_layout_t *a_layout)
const log4c_layout_type_tlog4c_layout_get_type (const log4c_layout_t *a_layout)
const log4c_layout_type_tlog4c_layout_set_type (log4c_layout_t *a_layout, const log4c_layout_type_t *a_type)
void * log4c_layout_get_udata (const log4c_layout_t *a_layout)
void * log4c_layout_set_udata (log4c_layout_t *a_layout, void *a_udata)
const char * log4c_layout_format (const log4c_layout_t *a_layout, const log4c_logging_event_t *a_event)
void log4c_layout_print (const log4c_layout_t *a_layout, FILE *a_stream)


Detailed Description

Interface for user specific layout format of log4c_logging_event events.

Todo:
the layout interface needs a better configuration system depending on the layout type. The udata field is a just a trick.

a pattern layout would be welcomed !!


Define Documentation

#define log4c_layout_type_define a_type   ) 
 

Helper macro to define static layout types.

Parameters:
a_type the log4c_layout_type_t object to define
Warning:
needs GCC support


Typedef Documentation

typedef struct __log4c_layout log4c_layout_t
 

log4c layout class

typedef struct log4c_layout_type log4c_layout_type_t
 

log4c layout type class

Attributes description:

  • name layout type name
  • format


Function Documentation

void log4c_layout_delete log4c_layout_t a_layout  ) 
 

Destructor for layout.

const char* log4c_layout_format const log4c_layout_t a_layout,
const log4c_logging_event_t a_event
 

format a log4c_logging_event events to a string.

Parameters:
a_layout the log4c_layout_t object
a_event a logging_event_t object
Returns:
an appendable string.

log4c_layout_t* log4c_layout_get const char *  a_name  ) 
 

Get a pointer to an existing layout.

Parameters:
a_name the name of the layout to return.
Returns:
a pointer to an existing layout, or NULL if no layout with the specfied name exists.

const char* log4c_layout_get_name const log4c_layout_t a_layout  ) 
 

Parameters:
a_layout the log4c_layout_t object
Returns:
the layout name

const log4c_layout_type_t* log4c_layout_get_type const log4c_layout_t a_layout  ) 
 

Parameters:
a_layout the log4c_layout_t object
Returns:
a log4c_layout_type_t object

void* log4c_layout_get_udata const log4c_layout_t a_layout  ) 
 

Parameters:
a_layout the log4c_layout_t object
Returns:
the layout user data

log4c_layout_t* log4c_layout_new const char *  a_name  ) 
 

Constructor for layout.

void log4c_layout_print const log4c_layout_t a_layout,
FILE *  a_stream
 

prints the layout on a stream

Parameters:
a_layout the log4c_layout_t object
a_stream the stream

const log4c_layout_type_t* log4c_layout_set_type log4c_layout_t a_layout,
const log4c_layout_type_t a_type
 

sets the layout type

Parameters:
a_layout the log4c_layout_t object
a_type the new layout type
Returns:
the previous layout type

void* log4c_layout_set_udata log4c_layout_t a_layout,
void *  a_udata
 

sets the layout user data

Parameters:
a_layout the log4c_layout_t object
a_udata the new layout user data
Returns:
the previous layout user data

const log4c_layout_type_t* log4c_layout_type_get const char *  a_name  ) 
 

Get a pointer to an existing layout type.

Parameters:
a_name the name of the layout type to return.
Returns:
a pointer to an existing layout type, or NULL if no layout type with the specified name exists.

const log4c_layout_type_t* log4c_layout_type_set const log4c_layout_type_t a_type  ) 
 

Set an layout type.

Parameters:
a_type a pointer to the new layout type to set.
Returns:
a pointer to the previous layout type of same name.


Generated on Sat Dec 11 11:03:57 2004 for log4c by  doxygen 1.3.9.1