| Liblinphone 5.4.0
    | 
Logging service of Linphone. More...
| Typedefs | |
| typedef struct _LinphoneLoggingService | LinphoneLoggingService | 
| Singleton class giving access to logging features.  More... | |
| 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.  More... | |
| 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.  More... | |
| LinphoneLoggingService * | linphone_logging_service_ref (LinphoneLoggingService *log_service) | 
| Increases the reference counter.  More... | |
| void | linphone_logging_service_unref (LinphoneLoggingService *log_service) | 
| Decreases the reference counter and destroy the object if the counter reaches 0.  More... | |
| void | linphone_logging_service_add_callbacks (LinphoneLoggingService *log_service, LinphoneLoggingServiceCbs *cbs) | 
| Adds a callback object to the list of listeners.  More... | |
| void | linphone_logging_service_remove_callbacks (LinphoneLoggingService *log_service, LinphoneLoggingServiceCbs *cbs) | 
| Removes a callback object from the list of listeners.  More... | |
| LinphoneLoggingServiceCbs * | linphone_logging_service_get_current_callbacks (const LinphoneLoggingService *log_service) | 
| Returns the current callbacks being called while iterating on callbacks.  More... | |
| void | linphone_logging_service_set_log_level (LinphoneLoggingService *log_service, LinphoneLogLevel level) | 
| Set the verbosity of the log.  More... | |
| 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.  More... | |
| unsigned int | linphone_logging_service_get_log_level_mask (const LinphoneLoggingService *log_service) | 
| Gets the log level mask.  More... | |
| 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.  More... | |
| 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()).  More... | |
| 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()).  More... | |
| void | linphone_logging_service_debug (LinphoneLoggingService *log_service, const char *message) | 
| Write a LinphoneLogLevelDebug message to the logs.  More... | |
| void | linphone_logging_service_trace (LinphoneLoggingService *log_service, const char *message) | 
| Write a LinphoneLogLevelTrace message to the logs.  More... | |
| void | linphone_logging_service_message (LinphoneLoggingService *log_service, const char *message) | 
| Write a LinphoneLogLevelMessage message to the logs.  More... | |
| void | linphone_logging_service_warning (LinphoneLoggingService *log_service, const char *message) | 
| Write a LinphoneLogLevelWarning message to the logs.  More... | |
| void | linphone_logging_service_error (LinphoneLoggingService *log_service, const char *message) | 
| Write a LinphoneLogLevelError message to the logs.  More... | |
| void | linphone_logging_service_fatal (LinphoneLoggingService *log_service, const char *message) | 
| Write a LinphoneLogLevelFatal message to the logs.  More... | |
| 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.  More... | |
| LinphoneLoggingServiceCbs * | linphone_logging_service_cbs_ref (LinphoneLoggingServiceCbs *cbs) | 
| Increases the reference counter.  More... | |
| void | linphone_logging_service_cbs_unref (LinphoneLoggingServiceCbs *cbs) | 
| Decreases the reference counter.  More... | |
| 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.  More... | |
| LinphoneLoggingServiceCbsLogMessageWrittenCb | linphone_logging_service_cbs_get_log_message_written (const LinphoneLoggingServiceCbs *cbs) | 
| Gets the value of the message event callback.  More... | |
| void | linphone_logging_service_cbs_set_user_data (LinphoneLoggingServiceCbs *cbs, void *user_data) | 
| Pass a pointer on a custom object.  More... | |
| void * | linphone_logging_service_cbs_get_user_data (const LinphoneLoggingServiceCbs *cbs) | 
| Gets the user_data pointer back.  More... | |
| MS2_DEPRECATED LinphoneLoggingServiceCbs * | linphone_logging_service_get_callbacks (const LinphoneLoggingService *log_service) | 
| Gets the logging service listener.  More... | |
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. |