Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LogUtils.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/editor/LogChannel.h"
7#include "mc/editor/logging/LogContext.h"
8#include "mc/editor/logging/LogLevel.h"
9#include "mc/editor/logging/LogLevelFilter.h"
10
11// auto generated forward declare list
12// clang-format off
13class HashedString;
14class Player;
15namespace Editor { class LogMessage; }
16namespace Editor { class ServiceProviderCollection; }
17namespace Editor { struct LogContent; }
18// clang-format on
19
20namespace Editor {
21
22class LogUtils {
23public:
24 // static functions
25 // NOLINTBEGIN
26#ifdef LL_PLAT_C
27 MCNAPI static ::std::string getTimeStamp();
28#endif
29
30 MCNAPI static void
31 log(::Player& player,
32 ::Editor::LogLevel level,
33 ::std::vector<::HashedString>&& tags,
34 ::std::variant<::std::string, ::Editor::LogContent> content,
35 ::Editor::LogChannel channelMask,
36 ::std::optional<bool> alert);
37
38 MCNAPI static void
40 ::Editor::LogContext context,
41 ::Editor::LogLevel level,
42 ::std::vector<::HashedString>&& tags,
43 ::std::variant<::std::string, ::Editor::LogContent> content,
44 ::Editor::LogChannel channelMask,
45 ::std::optional<bool> alert);
46
47 MCNAPI static void queueToast(
49 ::Editor::LogContext context,
50 ::Editor::LogLevel level,
52 );
53
54#ifdef LL_PLAT_C
55 MCNAPI static bool shouldFilterMessage(
56 ::Editor::LogMessage const& message,
57 ::Editor::LogLevelFilter levelFilter,
58 ::std::vector<::HashedString> const& expectedTags
59 );
60#endif
61 // NOLINTEND
62};
63
64} // namespace Editor
Definition LogMessage.h:12
Definition LogUtils.h:22
static MCAPI void queueToast(::Editor::ServiceProviderCollection &providers, ::Editor::LogContext context, ::Editor::LogLevel level, ::Editor::LogContent content)
static MCAPI void log(::Editor::ServiceProviderCollection &providers, ::Editor::LogContext context, ::Editor::LogLevel level, ::std::vector<::HashedString > &&tags, ::std::variant<::std::string, ::Editor::LogContent > content, ::Editor::LogChannel channelMask, ::std::optional< bool > alert)
static MCAPI void log(::Player &player, ::Editor::LogLevel level, ::std::vector<::HashedString > &&tags, ::std::variant<::std::string, ::Editor::LogContent > content, ::Editor::LogChannel channelMask, ::std::optional< bool > alert)
Definition ServiceProviderCollection.h:7
Definition HashedString.h:5
Definition Player.h:131
Definition LogContent.h:7
Definition context.h:5