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
10#include <Ultralight/String.h>
11
12namespace ultralight {
13
14///
15/// Log levels, used with Logger::LogMessage
16///
17enum 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///
33public:
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
#define UExport
Definition Defines.h:65
User-defined logging interface.
Definition Logger.h:32
virtual void LogMessage(LogLevel log_level, const String &message)=0
Called when the library wants to display a log message.
UTF-8 String container with conversions for UTF-16 and UTF-32.
Definition String.h:21
Definition App.h:14
LogLevel
Log levels, used with Logger::LogMessage.
Definition Logger.h:17