|
Liblinphone 5.2.0
|
Typedefs | |
| typedef struct _LinphoneLoggingService | LinphoneLoggingService |
| Singleton class giving access to logging features. | |
| typedef struct _LinphoneLoggingServiceCbs | LinphoneLoggingServiceCbs |
| Listener for LinphoneLoggingService. | |
| typedef enum _LinphoneLogLevel | LinphoneLogLevel |
| Verbosity levels of log messages. | |
| typedef void(* | LinphoneLoggingServiceCbsLogMessageWrittenCb) (LinphoneLoggingService *log_service, const char *domain, LinphoneLogLevel level, const char *message) |
| Type of callbacks called each time liblinphone write a log message. | |
Enumerations | |
| enum | _LinphoneLogLevel { LinphoneLogLevelDebug = 1<<0 , LinphoneLogLevelTrace = 1<<1 , LinphoneLogLevelMessage = 1<<2 , LinphoneLogLevelWarning = 1<<3 , LinphoneLogLevelError = 1<<4 , LinphoneLogLevelFatal = 1<<5 } |
| Verbosity levels of log messages. More... | |
Functions | |
| LinphoneLoggingService * | linphone_logging_service_get (void) |
| Gets the singleton logging service object. | |
| LinphoneLoggingService * | linphone_logging_service_ref (LinphoneLoggingService *log_service) |
| Increases the reference counter. | |
| void | linphone_logging_service_unref (LinphoneLoggingService *log_service) |
| Decreases the reference counter and destroy the object if the counter reaches 0. | |
| void | linphone_logging_service_add_callbacks (LinphoneLoggingService *log_service, LinphoneLoggingServiceCbs *cbs) |
| Adds a callback object to the list of listeners. | |
| void | linphone_logging_service_remove_callbacks (LinphoneLoggingService *log_service, LinphoneLoggingServiceCbs *cbs) |
| Removes a callback object from the list of listeners. | |
| LinphoneLoggingServiceCbs * | linphone_logging_service_get_current_callbacks (const LinphoneLoggingService *log_service) |
| Returns the current callbacks being called while iterating on callbacks. | |
| void | linphone_logging_service_set_log_level (LinphoneLoggingService *log_service, LinphoneLogLevel level) |
| Set the verbosity of the log. | |
| void | linphone_logging_service_set_log_level_mask (LinphoneLoggingService *log_service, unsigned int mask) |
| Sets the types of messages that will be authorized to be written in the log. | |
| unsigned int | linphone_logging_service_get_log_level_mask (const LinphoneLoggingService *log_service) |
| Gets the log level mask. | |
| void | linphone_logging_service_set_log_file (const LinphoneLoggingService *log_service, const char *dir, const char *filename, size_t max_size) |
| Enables logging in a file. | |
| void | linphone_logging_service_set_domain (LinphoneLoggingService *log_service, const char *domain) |
| Set the domain where application logs are written (for example with linphone_logging_service_message()). | |
| const char * | linphone_logging_service_get_domain (LinphoneLoggingService *log_service) |
| Get the domain where application logs are written (for example with linphone_logging_service_message()). | |
| void | linphone_logging_service_debug (LinphoneLoggingService *log_service, const char *message) |
| Write a LinphoneLogLevelDebug message to the logs. | |
| void | linphone_logging_service_trace (LinphoneLoggingService *log_service, const char *message) |
| Write a LinphoneLogLevelTrace message to the logs. | |
| void | linphone_logging_service_message (LinphoneLoggingService *log_service, const char *message) |
| Write a LinphoneLogLevelMessage message to the logs. | |
| void | linphone_logging_service_warning (LinphoneLoggingService *log_service, const char *message) |
| Write a LinphoneLogLevelWarning message to the logs. | |
| void | linphone_logging_service_error (LinphoneLoggingService *log_service, const char *message) |
| Write a LinphoneLogLevelError message to the logs. | |
| void | linphone_logging_service_fatal (LinphoneLoggingService *log_service, const char *message) |
| Write a LinphoneLogLevelFatal message to the logs. | |
| void | linphone_logging_service_enable_stack_trace_dumps (LinphoneLoggingService *log_service, bool_t enable) |
| Allow Linphone to set handlers for catching exceptions and write the stack trace into log. | |
| LinphoneLoggingServiceCbs * | linphone_logging_service_cbs_ref (LinphoneLoggingServiceCbs *cbs) |
| Increases the reference counter. | |
| void | linphone_logging_service_cbs_unref (LinphoneLoggingServiceCbs *cbs) |
| Decreases the reference counter. | |
| void | linphone_logging_service_cbs_set_log_message_written (LinphoneLoggingServiceCbs *cbs, LinphoneLoggingServiceCbsLogMessageWrittenCb cb) |
| Sets the callback to call each time liblinphone writes a log message. | |
| LinphoneLoggingServiceCbsLogMessageWrittenCb | linphone_logging_service_cbs_get_log_message_written (const LinphoneLoggingServiceCbs *cbs) |
| Gets the value of the message event callback. | |
| void | linphone_logging_service_cbs_set_user_data (LinphoneLoggingServiceCbs *cbs, void *user_data) |
| Pass a pointer on a custom object. | |
| void * | linphone_logging_service_cbs_get_user_data (const LinphoneLoggingServiceCbs *cbs) |
| Gets the user_data pointer back. | |
| MS2_DEPRECATED LinphoneLoggingServiceCbs * | linphone_logging_service_get_callbacks (const LinphoneLoggingService *log_service) |
| Gets the logging service listener. | |
Logging service of Linphone.
| typedef struct _LinphoneLoggingService LinphoneLoggingService |
Singleton class giving access to logging features.
It supports custom domain, writing into a file as well as several verbosity levels. The LinphoneLoggingServiceCbs listener allows you to be notified each time a log is printed.
As the LinphoneLoggingService is a singleton, use linphone_logging_service_get() to get it.
| typedef void(* LinphoneLoggingServiceCbsLogMessageWrittenCb) (LinphoneLoggingService *log_service, const char *domain, LinphoneLogLevel level, const char *message) |
Type of callbacks called each time liblinphone write a log message.
| log_service | A pointer on the logging service singleton. |
| domain | A string describing which sub-library of liblinphone the message is coming from. |
| level | Verbosity LinphoneLogLevel of the message. |
| message | Content of the message. |
| enum _LinphoneLogLevel |
Verbosity levels of log messages.
| void linphone_logging_service_add_callbacks | ( | LinphoneLoggingService * | log_service, |
| LinphoneLoggingServiceCbs * | cbs ) |
Adds a callback object to the list of listeners.
| log_service | the LinphoneLoggingService object |
| cbs | the LinphoneLoggingServiceCbs to add |
| LinphoneLoggingServiceCbsLogMessageWrittenCb linphone_logging_service_cbs_get_log_message_written | ( | const LinphoneLoggingServiceCbs * | cbs | ) |
Gets the value of the message event callback.
| cbs | the LinphoneLoggingServiceCbs object. |
| void * linphone_logging_service_cbs_get_user_data | ( | const LinphoneLoggingServiceCbs * | cbs | ) |
Gets the user_data pointer back.
| cbs | the LinphoneLoggingServiceCbs object. |
| LinphoneLoggingServiceCbs * linphone_logging_service_cbs_ref | ( | LinphoneLoggingServiceCbs * | cbs | ) |
Increases the reference counter.
| cbs | the LinphoneLoggingServiceCbs object. |
| void linphone_logging_service_cbs_set_log_message_written | ( | LinphoneLoggingServiceCbs * | cbs, |
| LinphoneLoggingServiceCbsLogMessageWrittenCb | cb ) |
Sets the callback to call each time liblinphone writes a log message.
| cbs | the LinphoneLoggingServiceCbs object. |
| cb | the LinphoneLoggingServiceCbsLogMessageWrittenCb to set |
| void linphone_logging_service_cbs_set_user_data | ( | LinphoneLoggingServiceCbs * | cbs, |
| void * | user_data ) |
Pass a pointer on a custom object.
That pointer can be get back by callbacks by using #linphone_logging_service_get_cbs() and linphone_logging_service_cbs_get_user_data().
| cbs | the LinphoneLoggingServiceCbs object. |
| user_data | the user data pointer. |
| void linphone_logging_service_cbs_unref | ( | LinphoneLoggingServiceCbs * | cbs | ) |
Decreases the reference counter.
The object is automatically destroyed once the counter reach 0.
| cbs | the LinphoneLoggingServiceCbs object. |
| void linphone_logging_service_debug | ( | LinphoneLoggingService * | log_service, |
| const char * | message ) |
Write a LinphoneLogLevelDebug message to the logs.
| log_service | the LinphoneLoggingService object |
| message | The log message. |
| void linphone_logging_service_enable_stack_trace_dumps | ( | LinphoneLoggingService * | log_service, |
| bool_t | enable ) |
Allow Linphone to set handlers for catching exceptions and write the stack trace into log.
Available for Windows. It keeps old handlers.
| log_service | the LinphoneLoggingService object |
| enable | if TRUE global handlers will be prepend by the logger handlers. By default, it is FALSE. |
| void linphone_logging_service_error | ( | LinphoneLoggingService * | log_service, |
| const char * | message ) |
Write a LinphoneLogLevelError message to the logs.
| log_service | the LinphoneLoggingService object |
| message | The log message. |
| void linphone_logging_service_fatal | ( | LinphoneLoggingService * | log_service, |
| const char * | message ) |
Write a LinphoneLogLevelFatal message to the logs.
| log_service | the LinphoneLoggingService object |
| message | The log message. |
| LinphoneLoggingService * linphone_logging_service_get | ( | void | ) |
Gets the singleton logging service object.
The singleton is automatically instantiated if it hasn't been done yet.
| MS2_DEPRECATED LinphoneLoggingServiceCbs * linphone_logging_service_get_callbacks | ( | const LinphoneLoggingService * | log_service | ) |
Gets the logging service listener.
| log_service | the LinphoneLoggingService object |
| LinphoneLoggingServiceCbs * linphone_logging_service_get_current_callbacks | ( | const LinphoneLoggingService * | log_service | ) |
Returns the current callbacks being called while iterating on callbacks.
| log_service | the LinphoneLoggingService object |
| const char * linphone_logging_service_get_domain | ( | LinphoneLoggingService * | log_service | ) |
Get the domain where application logs are written (for example with linphone_logging_service_message()).
| log_service | the LinphoneLoggingService object |
| unsigned int linphone_logging_service_get_log_level_mask | ( | const LinphoneLoggingService * | log_service | ) |
Gets the log level mask.
| log_service | the LinphoneLoggingService object |
| void linphone_logging_service_message | ( | LinphoneLoggingService * | log_service, |
| const char * | message ) |
Write a LinphoneLogLevelMessage message to the logs.
| log_service | the LinphoneLoggingService object |
| message | The log message. |
| LinphoneLoggingService * linphone_logging_service_ref | ( | LinphoneLoggingService * | log_service | ) |
Increases the reference counter.
| log_service | the LinphoneLoggingService object |
| void linphone_logging_service_remove_callbacks | ( | LinphoneLoggingService * | log_service, |
| LinphoneLoggingServiceCbs * | cbs ) |
Removes a callback object from the list of listeners.
| log_service | the LinphoneLoggingService object |
| cbs | the LinphoneLoggingServiceCbs to remove |
| void linphone_logging_service_set_domain | ( | LinphoneLoggingService * | log_service, |
| const char * | domain ) |
Set the domain where application logs are written (for example with linphone_logging_service_message()).
| log_service | the LinphoneLoggingService object |
| domain | The domain. |
| void linphone_logging_service_set_log_file | ( | const LinphoneLoggingService * | log_service, |
| const char * | dir, | ||
| const char * | filename, | ||
| size_t | max_size ) |
Enables logging in a file.
That function enables an internal log handler that writes log messages in log-rotated files.
| log_service | the LinphoneLoggingService object |
| dir | Directory where to create the distinct parts of the log. |
| filename | Name of the log file. |
| max_size | The maximal size of each part of the log. The log rotating is triggered each time the currently opened log part reach that limit. |
| void linphone_logging_service_set_log_level | ( | LinphoneLoggingService * | log_service, |
| LinphoneLogLevel | level ) |
Set the verbosity of the log.
For instance, a level of LinphoneLogLevelMessage will let pass fatal, error, warning and message-typed messages whereas trace and debug messages will be dumped out.
| log_service | the LinphoneLoggingService object |
| level | the LinphoneLogLevel to set |
| void linphone_logging_service_set_log_level_mask | ( | LinphoneLoggingService * | log_service, |
| unsigned int | mask ) |
Sets the types of messages that will be authorized to be written in the log.
| log_service | the LinphoneLoggingService object |
| mask | Example: LinphoneLogLevelMessage|LinphoneLogLevelError will ONLY let pass message-typed and error messages. |
| void linphone_logging_service_trace | ( | LinphoneLoggingService * | log_service, |
| const char * | message ) |
Write a LinphoneLogLevelTrace message to the logs.
| log_service | the LinphoneLoggingService object |
| message | The log message. |
| void linphone_logging_service_unref | ( | LinphoneLoggingService * | log_service | ) |
Decreases the reference counter and destroy the object if the counter reaches 0.
| log_service | the LinphoneLoggingService object |
| void linphone_logging_service_warning | ( | LinphoneLoggingService * | log_service, |
| const char * | message ) |
Write a LinphoneLogLevelWarning message to the logs.
| log_service | the LinphoneLoggingService object |
| message | The log message. |