logging tools
[utils]


Defines

#define GF_LOG(_log_level, _log_tools, __args)
 Message logging.

Typedefs

typedef void(* gf_log_cbk )(void *cbck, u32 log_level, u32 log_tool, const char *fmt, va_list vlist)
 Log Message Callback.

Enumerations

enum  { GF_LOG_ERROR = 1, GF_LOG_WARNING, GF_LOG_INFO, GF_LOG_DEBUG }
enum  {
  GF_LOG_CORE = 1, GF_LOG_CODING = 1<<1, GF_LOG_CONTAINER = 1<<2, GF_LOG_NETWORK = 1<<3,
  GF_LOG_RTP = 1<<4, GF_LOG_AUTHOR = 1<<5, GF_LOG_SYNC = 1<<6, GF_LOG_CODEC = 1<<7,
  GF_LOG_PARSER = 1<<8, GF_LOG_MEDIA = 1<<9, GF_LOG_SCENE = 1<<10, GF_LOG_SCRIPT = 1<<11,
  GF_LOG_INTERACT = 1<<12, GF_LOG_COMPOSE = 1<<13, GF_LOG_CACHE = 1<<14, GF_LOG_MMIO = 1<<15,
  GF_LOG_RTI = 1<<16, GF_LOG_SMIL = 1<<17
}

Functions

void gf_log_set_level (u32 level)
 Log level assignment.
void gf_log_set_tools (u32 tools)
 Log modules assignment.
gf_log_cbk gf_log_set_callback (void *usr_cbk, gf_log_cbk cbk)
 Log overwrite.
void gf_log (const char *fmt,...)
void gf_log_lt (u32 ll, u32 lt)
u32 gf_log_get_level ()
u32 gf_log_get_tools ()

Define Documentation

#define GF_LOG ( _log_level,
_log_tools,
__args   ) 

Macro for logging messages. Usage is GF_LOG(log_lev, log_module, (fmt, ...)). The log function is only called if log filtering allows it. This avoids fetching logged parameters when the tool is not being logged.


Typedef Documentation

typedef void(* gf_log_cbk)(void *cbck, u32 log_level, u32 log_tool, const char *fmt, va_list vlist)

The gf_log_cbk type is the type for the callback of the gf_log_set_callback function. By default all logs are redirected to stdout

Parameters:
cbck Opaque user data.
log_level level of the log. This value is not guaranteed in multi-threaded context.
log_tool tool emitting the log. This value is not guaranteed in multi-threaded context.
fmt message log format.
vlist message log param.


Enumeration Type Documentation

anonymous enum

GPAC Log Levels

These levels describes messages priority used when filtering logs

Enumerator:
GF_LOG_ERROR  Log message describes an error
GF_LOG_WARNING  Log message describes a warning
GF_LOG_INFO  Log message is informational (state, etc..)
GF_LOG_DEBUG  Log message is a debug info

anonymous enum

GPAC Log tools

These flags describes which sub-part of GPAC generates the log and are used when filtering logs

Enumerator:
GF_LOG_CORE  Log message from the core library (init, threads, network calls, etc)
GF_LOG_CODING  Log message from a raw media parser (BIFS, LASeR, A/V formats)
GF_LOG_CONTAINER  Log message from a bitstream parser (IsoMedia, MPEG-2 TS, OGG, ...)
GF_LOG_NETWORK  Log message from the network/service stack (messages & co)
GF_LOG_RTP  Log message from the RTP/RTCP stack (TS info) and packet structure & hinting (debug)
GF_LOG_AUTHOR  Log message from authoring subsystem (file manip, import/export)
GF_LOG_SYNC  Log message from the sync layer of the terminal
GF_LOG_CODEC  Log message from a codec
GF_LOG_PARSER  Log message from any XML parser (context loading, etc)
GF_LOG_MEDIA  Log message from the terminal/compositor, indicating media object state
GF_LOG_SCENE  Log message from the scene graph/scene manager (handling of nodes and attribute modif, DOM core)
GF_LOG_SCRIPT  Log message from the scripting engine
GF_LOG_INTERACT  Log message from event handling
GF_LOG_COMPOSE  Log message from compositor
GF_LOG_CACHE  Log for video object cache
GF_LOG_MMIO  Log message from multimedia I/O devices (audio/video input/output, ...)
GF_LOG_RTI  Log for runtime info (times, memory, CPU usage)
GF_LOG_SMIL  Log for SMIL timing and animation


Function Documentation

void gf_log_set_level ( u32  level  ) 

Sets the level used for log filtering. By default no log is performed

Parameters:
level log level used.

void gf_log_set_tools ( u32  tools  ) 

Sets the modules to be checked for log filtering. By default no modules are logged.

Parameters:
tools log tools filtered. This is an OR'ed combinaison of log module flags

gf_log_cbk gf_log_set_callback ( void *  usr_cbk,
gf_log_cbk  cbk 
)

Assigns a user-defined callback for printing log messages. By default all logs are redirected to stdout

Parameters:
usr_cbk Opaque user data
cbk callback log function
Returns:
previous callback function


Generated on Mon Feb 23 02:15:06 2009 for libgpac by  doxygen 1.5.7.1