Ultralight C++ API
1.3.0
Loading...
Searching...
No Matches
Logger.h
Go to the documentation of this file.
1
/******************************************************************************
2
* This file is a part of Ultralight, an ultra-portable web-browser engine. *
3
* *
4
* See <https://ultralig.ht> for licensing and more. *
5
* *
6
* (C) 2023 Ultralight, Inc. *
7
*****************************************************************************/
8
#pragma once
9
#include <
Ultralight/Defines.h
>
10
#include <
Ultralight/String.h
>
11
12
namespace
ultralight
{
13
14
///
15
/// Log levels, used with Logger::LogMessage
16
///
17
enum class
LogLevel
: uint8_t {
18
Error
,
19
Warning
,
20
Info
21
};
22
23
///
24
/// User-defined logging interface.
25
///
26
/// The library uses this to display log messages for debugging during development.
27
///
28
/// This is intended to be implemented by users and defined before creating the Renderer.
29
///
30
/// @see Platform::set_logger()
31
///
32
class
UExport
Logger
{
33
public
:
34
virtual
~Logger
();
35
36
///
37
/// Called when the library wants to display a log message.
38
///
39
virtual
void
LogMessage
(
LogLevel
log_level,
const
String
& message) = 0;
40
};
41
42
}
// namespace ultralight
String.h
Defines.h
UExport
#define UExport
Definition
Defines.h:65
ultralight::Logger
User-defined logging interface.
Definition
Logger.h:32
ultralight::Logger::~Logger
virtual ~Logger()
ultralight::Logger::LogMessage
virtual void LogMessage(LogLevel log_level, const String &message)=0
Called when the library wants to display a log message.
ultralight::String
UTF-8 String container with conversions for UTF-16 and UTF-32.
Definition
String.h:21
ultralight
Definition
App.h:14
ultralight::LogLevel
LogLevel
Log levels, used with Logger::LogMessage.
Definition
Logger.h:17
ultralight::LogLevel::Warning
@ Warning
ultralight::LogLevel::Info
@ Info
ultralight::LogLevel::Error
@ Error
Ultralight
platform
Logger.h
Generated by
1.9.7