Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LoggingServiceProvider.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
7#include "mc/editor/LogChannel.h"
8#include "mc/editor/logging/LogLevel.h"
9
10// auto generated forward declare list
11// clang-format off
12class HashedString;
13class Player;
14namespace Bedrock::PubSub { class Subscription; }
15namespace Editor { class LogMessage; }
16namespace Editor { struct LogContent; }
17// clang-format on
18
19namespace Editor::Services {
20
22public:
23 // virtual functions
24 // NOLINTBEGIN
25 virtual ~LoggingServiceProvider() = default;
26
27#ifdef LL_PLAT_S
28 virtual void
29 log(::Editor::LogContent content,
30 ::Player* player,
31 ::Editor::LogLevel level,
32 ::std::vector<::HashedString>&& areaTags,
33 ::Editor::LogChannel logChannelMask,
34 ::std::optional<bool> alert) = 0;
35#else // LL_PLAT_C
36 virtual void
37 log(::Editor::LogContent content,
38 ::Player* player,
39 ::Editor::LogLevel level,
40 ::std::vector<::HashedString>&& areaTags,
41 ::Editor::LogChannel logChannel,
42 ::std::optional<bool> alert) = 0;
43#endif
44
45 virtual void flush() = 0;
46
47 virtual ::std::vector<::Editor::LogMessage> const& getMessages() const = 0;
48
49 virtual ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription>
50 listenForLogMessage(::std::function<void(::Editor::LogMessage const&)> func) = 0;
51 // NOLINTEND
52};
53
54} // namespace Editor::Services
Definition Subscription.h:10
Definition LogMessage.h:12
Definition LoggingServiceProvider.h:21
Definition HashedString.h:5
Definition Player.h:131
Definition LogContent.h:7