Logging functions.
More...
#include <stdio.h>
#include <stdarg.h>
#include "libjaylink.h"
#include "libjaylink-internal.h"
Get the libjaylink log domain.
- Parameters
-
[in] | ctx | libjaylink context. |
- Returns
- A string which contains the current log domain on success, or NULL on failure. The string is null-terminated and must not be free'd by the caller.
- Since
- 0.1.0
Get the libjaylink log level.
- Parameters
-
[in] | ctx | libjaylink context. |
[out] | level | Log level on success, and undefined on failure. |
- Return values
-
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
- Since
- 0.1.0
Set the libjaylink log callback function.
- Parameters
-
[in,out] | ctx | libjaylink context. |
[in] | callback | Callback function to use, or NULL to use the default log function. |
[in] | user_data | User data to be passed to the callback function. |
- Return values
-
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
- Since
- 0.1.0
int jaylink_log_set_domain |
( |
struct jaylink_context * |
ctx, |
|
|
const char * |
domain |
|
) |
| |
Set the libjaylink log domain.
The log domain is a string which is used as prefix for all log messages to differentiate them from messages of other libraries.
The maximum length of the log domain is JAYLINK_LOG_DOMAIN_MAX_LENGTH bytes, excluding the trailing null-terminator. A log domain which exceeds this length will be silently truncated.
- Parameters
-
- Return values
-
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
JAYLINK_ERR | Other error conditions. |
- Since
- 0.1.0
Set the libjaylink log level.
- Parameters
-
[in,out] | ctx | libjaylink context. |
[in] | level | Log level to set. |
- Return values
-
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
- Since
- 0.1.0