Loading...
Searching...
No Matches
CAPI_Logger.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * This file is a part of Ultralight. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2024 Ultralight, Inc. *
7 **************************************************************************************************/
8
9///
10/// @file CAPI_Logger.h
11///
12/// User-defined logging interface.
13///
14/// `#include <Ultralight/CAPI/CAPI_Logger.h>`
15///
16/// The library uses this to display log messages for debugging during development.
17///
18/// This is intended to be implemented by users and defined before creating the Renderer.
19///
20/// @see ulPlatformSetLogger()
21///
22#ifndef ULTRALIGHT_CAPI_LOGGER_H
23#define ULTRALIGHT_CAPI_LOGGER_H
24
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/******************************************************************************
32 * Logger
33 *****************************************************************************/
34
36
37///
38/// The callback invoked when the library wants to print a message to the log.
39///
40typedef void (*ULLoggerLogMessageCallback)(ULLogLevel log_level, ULString message);
41
45
46#ifdef __cplusplus
47} // extern "C"
48#endif
49
50#endif // ULTRALIGHT_CAPI_LOGGER_H
Various defines and utility functions for the C API.
struct C_String * ULString
Definition CAPI_Defines.h:65
ULLogLevel
Definition CAPI_Logger.h:35
@ kLogLevel_Info
Definition CAPI_Logger.h:35
@ kLogLevel_Error
Definition CAPI_Logger.h:35
@ kLogLevel_Warning
Definition CAPI_Logger.h:35
void(* ULLoggerLogMessageCallback)(ULLogLevel log_level, ULString message)
The callback invoked when the library wants to print a message to the log.
Definition CAPI_Logger.h:40
Definition CAPI_Logger.h:42
ULLoggerLogMessageCallback log_message
Definition CAPI_Logger.h:43