GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
logging tools
+ Collaboration diagram for logging tools:

Macros

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

Typedefs

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

Enumerations

enum  {
  GF_LOG_QUIET = 0, GF_LOG_ERROR, GF_LOG_WARNING, GF_LOG_INFO,
  GF_LOG_DEBUG
}
 
enum  {
  GF_LOG_CORE = 0, GF_LOG_CODING, GF_LOG_CONTAINER, GF_LOG_NETWORK,
  GF_LOG_RTP, GF_LOG_AUTHOR, GF_LOG_SYNC, GF_LOG_CODEC,
  GF_LOG_PARSER, GF_LOG_MEDIA, GF_LOG_SCENE, GF_LOG_SCRIPT,
  GF_LOG_INTERACT, GF_LOG_COMPOSE, GF_LOG_CACHE, GF_LOG_MMIO,
  GF_LOG_RTI, GF_LOG_SMIL, GF_LOG_MEMORY, GF_LOG_AUDIO,
  GF_LOG_MODULE, GF_LOG_MUTEX, GF_LOG_CONDITION, GF_LOG_DASH,
  GF_LOG_CONSOLE, GF_LOG_APP, GF_LOG_SCHEDULER, GF_LOG_ALL,
  GF_LOG_TOOL_MAX = GF_LOG_ALL
}
 

Functions

void gf_log_set_strict_error (Bool strict)
 Log exits at first error assignment. More...
 
char * gf_log_get_tools_levels ()
 gets string-formated log tools More...
 
void gf_log_set_tool_level (u32 tool, u32 level)
 Log modules assignment. More...
 
gf_log_cbk gf_log_set_callback (void *usr_cbk, gf_log_cbk cbk)
 Log overwrite. More...
 
void gf_log (const char *fmt,...)
 
void gf_log_lt (u32 ll, u32 lt)
 
Bool gf_log_tool_level_on (u32 log_tool, u32 log_level)
 Log level checking. More...
 
GF_Err gf_log_set_tools_levels (const char *log_tools_levels)
 Set log tools and levels. More...
 
GF_Err gf_log_modify_tools_levels (const char *val)
 Modify log tools and levels. More...
 

Detailed Description

Macro Definition 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 stderr

Parameters
cbckOpaque user data.
log_levellevel of the log. This value is not guaranteed in multi-threaded context.
log_tooltool emitting the log. This value is not guaranteed in multi-threaded context.
fmtmessage log format.
vlistmessage log param.

Enumeration Type Documentation

anonymous enum

GPAC Log Levels

These levels describes messages priority used when filtering logs

Enumerator
GF_LOG_QUIET 

Disable all Log message

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 APIs - does not cover alert() in the script code itself

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

GF_LOG_MEMORY 

Log for memory tracker

GF_LOG_AUDIO 

Log for audio compositor

GF_LOG_MODULE 

Generic Log for modules

GF_LOG_MUTEX 

Log for threads and mutexes

GF_LOG_CONDITION 

Log for threads and condition

GF_LOG_DASH 

Log for all HTTP streaming

GF_LOG_CONSOLE 

Log for all messages coming from GF_Terminal or script alert()

GF_LOG_APP 

Log for all messages coming the application, not used by libgpac or the modules

GF_LOG_SCHEDULER 

Log for all messages coming from the scheduler

GF_LOG_ALL 

special value used to set a level for all tools

GF_LOG_TOOL_MAX 

Function Documentation

void gf_log_set_strict_error ( Bool  strict)

When GF_LOG_ERROR happens, program leaves with instruction exit(1);

Parameters
strictstrict behaviour when encoutering a serious error.

+ Here is the caller graph for this function:

char* gf_log_get_tools_levels ( )

Returns the string-formatted log tools and levels. Returned string shall be freed by the caller.

Returns
string-formatted log tools.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gf_log_set_tool_level ( u32  tool,
u32  level 
)

Set log level for a given tool.

Sets the tools to be checked for log filtering. By default no logging is performed.

Parameters
tooltool to be logged.
levellevel of logging for this tool.

Set log level for a given tool.

Parameters
tooltool to log
levellog level for this tool

+ Here is the caller graph for this function:

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 stderr

Parameters
usr_cbkOpaque user data
cbkcallback log function
Returns
previous callback function

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gf_log ( const char *  fmt,
  ... 
)

+ Here is the caller graph for this function:

void gf_log_lt ( u32  ll,
u32  lt 
)

+ Here is the caller graph for this function:

Bool gf_log_tool_level_on ( u32  log_tool,
u32  log_level 
)

Checks if a given tool is logged for the given level

Parameters
log_tooltool to check
log_levellevel to check
Returns
1 if logged, 0 otherwise

+ Here is the caller graph for this function:

GF_Err gf_log_set_tools_levels ( const char *  log_tools_levels)

Set log tools and levels according to the log_tools_levels string. All previous log settings are discarded.

Parameters
log_tools_levelsstring specifying the tools and levels. It is formatted as logToolX@logLevelX:logToolZ@logLevelZ:...
Returns
GF_OK or GF_BAD_PARAM

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_log_modify_tools_levels ( const char *  val)

Modify log tools and levels according to the log_tools_levels string. Previous log settings are kept.

Parameters
valstring specifying the tools and levels. It is formatted as logToolX@logLevelX:logToolZ@logLevelZ:...
Returns
GF_OK or GF_BAD_PARAM

+ Here is the caller graph for this function: