docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C API
1.4.0
Toggle main menu visibility
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
25
#include <
Ultralight/CAPI/CAPI_Defines.h
>
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
/******************************************************************************
32
* Logger
33
*****************************************************************************/
34
35
typedef
enum
{
kLogLevel_Error
= 0,
kLogLevel_Warning
,
kLogLevel_Info
}
ULLogLevel
;
36
37
///
38
/// The callback invoked when the library wants to print a message to the log.
39
///
40
typedef
void (*
ULLoggerLogMessageCallback
)(
ULLogLevel
log_level,
ULString
message);
41
42
typedef
struct
{
43
ULLoggerLogMessageCallback
log_message
;
44
}
ULLogger
;
45
46
#ifdef __cplusplus
47
}
// extern "C"
48
#endif
49
50
#endif
// ULTRALIGHT_CAPI_LOGGER_H
CAPI_Defines.h
Various defines and utility functions for the C API.
ULString
struct C_String * ULString
Definition
CAPI_Defines.h:65
ULLogLevel
ULLogLevel
Definition
CAPI_Logger.h:35
kLogLevel_Info
@ kLogLevel_Info
Definition
CAPI_Logger.h:35
kLogLevel_Error
@ kLogLevel_Error
Definition
CAPI_Logger.h:35
kLogLevel_Warning
@ kLogLevel_Warning
Definition
CAPI_Logger.h:35
ULLoggerLogMessageCallback
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
ULLogger
Definition
CAPI_Logger.h:42
ULLogger::log_message
ULLoggerLogMessageCallback log_message
Definition
CAPI_Logger.h:43
Ultralight
CAPI
CAPI_Logger.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4