Go to the source code of this file.
|
typedef struct _LDLoggingBasicBuilder * | LDLoggingBasicBuilder |
|
typedef struct _LDLoggingCustomBuilder * | LDLoggingCustomBuilder |
|
typedef bool(* | EnabledFn) (enum LDLogLevel level, void *user_data) |
|
typedef void(* | WriteFn) (enum LDLogLevel level, char const *msg, void *user_data) |
|
◆ LDLogBackend_Init()
Initializes a custom log backend. Must be called before passing a custom backend into configuration.
- Parameters
-
backend | Backend to initialize. |
◆ LDLoggingBasicBuilder_Free()
LDLoggingBasicBuilder_Free |
( |
LDLoggingBasicBuilder |
b | ) |
|
Frees a basic logging builder. Do not call if the builder was consumed by the config builder.
- Parameters
-
◆ LDLoggingBasicBuilder_Level()
LDLoggingBasicBuilder_Level |
( |
LDLoggingBasicBuilder |
b, |
|
|
enum LDLogLevel |
level |
|
) |
| |
Sets the enabled log level. The default level is LD_LOG_INFO.
- Parameters
-
b | Client config builder. Must not be NULL. |
level | Level to set. |
◆ LDLoggingBasicBuilder_New()
LDLoggingBasicBuilder_New |
( |
| ) |
|
Creates a new builder for LaunchDarkly's default logger.
If not passed into the config builder, must be manually freed with LDLoggingBasicBuilder_Free.
- Returns
- New builder.
◆ LDLoggingBasicBuilder_Tag()
LDLoggingBasicBuilder_Tag |
( |
LDLoggingBasicBuilder |
b, |
|
|
char const * |
tag |
|
) |
| |
Set a tag for this logger. This tag will be included at the start of log entries in square brackets.
If the name was "LaunchDarkly", then log entries will be prefixed with "[LaunchDarkly]". The default tag is "LaunchDarkly".
- Parameters
-
b | Client config builder. Must not be NULL. |
tag | Tag to set. Must not be NULL. |
◆ LDLoggingCustomBuilder_Backend()
LDLoggingCustomBuilder_Backend |
( |
LDLoggingCustomBuilder |
b, |
|
|
struct LDLogBackend |
backend |
|
) |
| |
Sets a custom log backend.
- Parameters
-
b | Custom logging builder. Must not be NULL. |
backend | The backend to use for logging. Ensure the backend was initialized with LDLogBackend_Init. |
◆ LDLoggingCustomBuilder_Free()
LDLoggingCustomBuilder_Free |
( |
LDLoggingCustomBuilder |
b | ) |
|
Frees a custom logging builder. Do not call if the builder was consumed by the config builder.
- Parameters
-
◆ LDLoggingCustomBuilder_New()
LDLoggingCustomBuilder_New |
( |
| ) |
|
Creates a new builder for a custom, user-provided logger.
If not passed into the config builder, must be manually freed with LDLoggingCustomBuilder_Free.
- Returns
- New builder.