Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
BedrockLog.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/diagnostics/LogAreaID.h"
7#include "mc/platform/diagnostics/bedrock_log/LogCategory.h"
8#include "mc/platform/diagnostics/bedrock_log/LogRule.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace BedrockLog { class LogAreaFilter; }
13namespace BedrockLog { struct CategoryLogs; }
14namespace Core { class Path; }
16// clang-format on
17
18namespace BedrockLog {
19// functions
20// NOLINTBEGIN
21MCNAPI bool
22_constructAreaFilterFromString(::std::string const& filterString, ::BedrockLog::LogAreaFilter& logAreaFilter);
23
24#ifdef LL_PLAT_S
25MCNAPI ::std::string _constructAreaFilterStringFromFilter(::BedrockLog::LogAreaFilter const& filter);
26#endif
27
28MCNAPI bool _constructPriorityFilterFromString(::std::string const& filterString, uint& logPriority);
29
30#ifdef LL_PLAT_S
31MCNAPI ::std::string _constructPriorityFilterStringFromFilter(uint filter);
32#endif
33
34MCNAPI void _initAreaFilterMap();
35
36MCNAPI void _initPriorityFilterMap();
37
38#ifdef LL_PLAT_S
39MCNAPI void closeAllLogs();
40#endif
41
42MCNAPI void closeAndResetAllLogs();
43
44MCNAPI void closeAndResetLog(::BedrockLog::LogCategory category);
45
46MCNAPI void createLog(
47 ::Core::Path const& _path,
48 ::std::string const& _labelDescription,
49 ::std::string const& _debugLogTimestamp,
50 ::BedrockLog::LogCategory _category,
51 ::std::bitset<3> _channels,
52 bool _createLogFile,
53 ::LogSettingsUpdater* _settings,
54 double _logCycleInS
55);
56
57MCAPI void log_fmt(
58 ::BedrockLog::LogCategory category,
59 ::std::bitset<3> channelMask,
60 ::BedrockLog::LogRule rule,
61 ::LogAreaID area,
62 uint priority,
63 char const* function,
64 int line,
65 ::fmt::v11::basic_string_view<char> format,
66 ::fmt::v11::basic_format_args<::fmt::v11::context> args
67);
68
69MCAPI void log_va(
70 ::BedrockLog::LogCategory _category,
71 ::std::bitset<3> channelMask,
72 ::BedrockLog::LogRule rule,
73 ::LogAreaID _area,
74 uint _priority,
75 char const* _function,
76 int _line,
77 char const* _pszFormat,
78 char* argptr
79);
80
81MCNAPI int rakDebugLog(char const* fstr, ...);
82
83MCNAPI void update();
84// NOLINTEND
85
86// static variables
87// NOLINTBEGIN
88MCNAPI ::BedrockLog::CategoryLogs& sCategory();
89// NOLINTEND
90
91} // namespace BedrockLog
Definition LogAreaFilter.h:7
Definition Path.h:10
Definition LogSettingsUpdater.h:5
Definition CategoryLogs.h:10