Site Home
Docs
Go to C API
Ultralight C++ API
1.4.0
Loading...
Searching...
No Matches
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
#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
UExport
#define UExport
Definition
Exports.h:25
String.h
Defines.h
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
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition
String.h:34
ultralight
Definition
App.h:14
ultralight::LogLevel
LogLevel
Log levels, used with Logger::LogMessage.
Definition
Logger.h:17
ultralight::DialogIcon::Warning
@ Warning
Warning icon.
ultralight::DialogIcon::Info
@ Info
Information icon.
ultralight::DialogIcon::Error
@ Error
Error icon.
Ultralight
platform
Logger.h