![]()  | 
  
    libgpac
    
   Documentation of the core library of GPAC 
   | 
  
Logging System. More...
 Collaboration diagram for Logging tools:Data Structures | |
| struct | GF_LogExtra | 
| Extra log instructions.  More... | |
Macros | |
| #define | GF_LOG(_log_level, _log_tools, __args) | 
| Message logging.   | |
Typedefs | |
| typedef void(* | gf_log_cbk) (void *cbck, GF_LOG_Level log_level, GF_LOG_Tool log_tool, const char *fmt, va_list vlist) | 
| Log Message Callback.   | |
Enumerations | |
| enum | GF_LOG_Level {  GF_LOG_QUIET = 0 , GF_LOG_ERROR , GF_LOG_WARNING , GF_LOG_INFO , GF_LOG_DEBUG }  | 
| GPAC Log Levels.  More... | |
| enum | GF_LOG_Tool {  GF_LOG_CORE = 0 , GF_LOG_CODING , GF_LOG_CONTAINER , GF_LOG_NETWORK , GF_LOG_HTTP , GF_LOG_RTP , GF_LOG_CODEC , GF_LOG_PARSER , GF_LOG_MEDIA , GF_LOG_SCENE , GF_LOG_SCRIPT , GF_LOG_INTERACT , GF_LOG_COMPOSE , GF_LOG_COMPTIME , GF_LOG_CACHE , GF_LOG_MMIO , GF_LOG_RTI , GF_LOG_MEMORY , GF_LOG_AUDIO , GF_LOG_MODULE , GF_LOG_MUTEX , GF_LOG_CONDITION , GF_LOG_DASH , GF_LOG_FILTER , GF_LOG_SCHEDULER , GF_LOG_ROUTE , GF_LOG_CONSOLE , GF_LOG_APP , GF_LOG_RMTWS , GF_LOG_ALL , GF_LOG_TOOL_MAX = GF_LOG_ALL , GF_LOG_TOOL_UNDEFINED }  | 
| GPAC Log tools.  More... | |
Functions | |
| Bool | gf_log_set_strict_error (Bool strict) | 
| Log exits at first error assignment.   | |
| char * | gf_log_get_tools_levels (void) | 
| gets string-formatted log tools   | |
| void | gf_log_set_tool_level (GF_LOG_Tool log_tool, GF_LOG_Level log_level) | 
| Log modules assignment.   | |
| gf_log_cbk | gf_log_set_callback (void *usr_cbk, gf_log_cbk cbk) | 
| Log overwrite.   | |
| Bool | gf_log_tool_level_on (GF_LOG_Tool log_tool, GF_LOG_Level log_level) | 
| Log level checking.   | |
| const char * | gf_log_tool_name (GF_LOG_Tool log_tool) | 
| Log tool name.   | |
| u32 | gf_log_get_tool_level (GF_LOG_Tool log_tool) | 
| Log level getter.   | |
| GF_Err | gf_log_set_tools_levels (const char *log_tools_levels, Bool reset_all) | 
| Set log tools and levels.   | |
| GF_Err | gf_log_modify_tools_levels (const char *val) | 
| Modify log tools and levels.   | |
| Bool | gf_log_use_color () | 
| Checks if color logs is enabled.   | |
| Bool | gf_log_use_file () | 
| Checks if logs are stored to file.   | |
| u32 | gf_log_parse_tool (const char *logs) | 
| Parses a log tool.   | |
| void | gf_log_reset_file () | 
| Resets log file Resets log file if any log file name was specified, by closing and reopening a new file.   | |
| void | gf_log_push_extra (const GF_LogExtra *log) | 
| void | gf_log_pop_extra (const GF_LogExtra *log) | 
| void | gf_log_reset_extras () | 
Logging System.
| struct GF_LogExtra | 
Extra log instructions.
| Data Fields | ||
|---|---|---|
| u32 | nb_tools | number of tools and levels | 
| GF_LOG_Tool * | tools | additionnal tools | 
| GF_LOG_Level * | levels | additionnal levels for the tools | 
| Bool | strict | exit if error | 
| #define GF_LOG | ( | _log_level, | |
| _log_tools, | |||
| __args | |||
| ) | 
Message logging.
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 void(* gf_log_cbk) (void *cbck, GF_LOG_Level log_level, GF_LOG_Tool log_tool, const char *fmt, va_list vlist) | 
Log Message Callback.
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
| 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. | 
| enum GF_LOG_Level | 
GPAC Log Levels.
These levels describes messages priority used when filtering logs
| enum GF_LOG_Tool | 
GPAC Log tools.
These flags describes which sub-part of GPAC generates the log and are used when filtering logs
Log exits at first error assignment.
When GF_LOG_ERROR happens, program leaves with instruction exit(1);
| strict | strict behavior when encoutering a serious error. | 
 Here is the caller graph for this function:| char * gf_log_get_tools_levels | ( | void | ) | 
gets string-formatted log tools
Gets the string-formatted log tools and levels. Returned string shall be freed by the caller.
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_log_set_tool_level | ( | GF_LOG_Tool | log_tool, | 
| GF_LOG_Level | log_level | ||
| ) | 
Log modules assignment.
Sets the tools to be checked for log filtering. By default no logging is performed.
| log_tool | the tool to be logged | 
| log_level | the level of logging 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 | ||
| ) | 
Log overwrite.
Assigns a user-defined callback for printing log messages. By default all logs are redirected to stderr
| usr_cbk | Opaque user data | 
| cbk | Callback log function | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| Bool gf_log_tool_level_on | ( | GF_LOG_Tool | log_tool, | 
| GF_LOG_Level | log_level | ||
| ) | 
Log level checking.
Checks if a given tool is logged for the given level
| log_tool | tool to check | 
| log_level | level to check | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| const char * gf_log_tool_name | ( | GF_LOG_Tool | log_tool | ) | 
Log tool name.
Gets log tool name
| log_tool | tool to check | 
| u32 gf_log_get_tool_level | ( | GF_LOG_Tool | log_tool | ) | 
Log level getter.
Gets log level of a given tool
| log_tool | tool to check | 
 Here is the caller graph for this function:Set log tools and levels.
Set log tools and levels according to the log_tools_levels string.
| log_tools_levels | string specifying the tools and levels. It is formatted as logToolX@logLevelX:logToolZ@logLevelZ:... | 
| reset_all | if GF_TRUE, all previous log settings are discarded. | 
 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.
Modify log tools and levels according to the log_tools_levels string. Previous log settings are kept.
| val | string specifying the tools and levels. It is formatted as logToolX@logLevelX:logToolZ@logLevelZ:... | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| Bool gf_log_use_color | ( | ) | 
Checks if color logs is enabled.
Checks if color logs is enabled
 Here is the call graph for this function:
 Here is the caller graph for this function:| Bool gf_log_use_file | ( | ) | 
Checks if logs are stored to file.
Checks if logs are stored to file
 Here is the caller graph for this function:| u32 gf_log_parse_tool | ( | const char * | logs | ) | 
Parses a log tool.
Parses a log tool by name
| logs | the name to parse | 
 Here is the caller graph for this function:| void gf_log_reset_file | ( | ) | 
Resets log file Resets log file if any log file name was specified, by closing and reopening a new file.
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_log_push_extra | ( | const GF_LogExtra * | log | ) | 
Register a new extra log levels
| log | extra levels to add - may be NULL but shall be valid until call to gf_log_pop_extra or gf_log_reset_extras or end of app | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_log_pop_extra | ( | const GF_LogExtra * | log | ) | 
Unregister an extra log levels
| log | extra levels to add - may be NULL | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_log_reset_extras | ( | ) | 
Unregister all extra log levels
 Here is the call graph for this function:
 Here is the caller graph for this function: