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/LogChannel.h"
9#include "mc/platform/diagnostics/bedrock_log/LogRule.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace Bedrock { class ScopeExit; }
14namespace BedrockLog { class LogAreaFilter; }
15namespace Core { class Path; }
17// clang-format on
18
19namespace BedrockLog {
20// functions
21// NOLINTBEGIN
22MCAPI char const* _areaFilterString(::LogAreaID _area);
23
24MCAPI bool
25_constructAreaFilterFromString(::std::string const& filterString, ::BedrockLog::LogAreaFilter& logAreaFilter);
26
27MCAPI ::std::string _constructAreaFilterStringFromFilter(::BedrockLog::LogAreaFilter const& filter);
28
29MCAPI bool _constructPriorityFilterFromString(::std::string const& filterString, uint& logPriority);
30
31MCAPI ::std::string _constructPriorityFilterStringFromFilter(uint filter);
32
33MCAPI void _initAreaFilterMap();
34
35MCAPI void _initPriorityFilterMap();
36
37MCAPI ::std::string _messageIdString(int _messageId);
38
39MCAPI ::std::string _processIdString();
40
41MCAPI ::std::string _threadIdString();
42
43MCAPI void closeAndResetAllLogs();
44
45MCAPI void closeAndResetLog(::BedrockLog::LogCategory category);
46
47MCAPI void createLog(
48 ::Core::Path const& _path,
49 ::std::string const& _labelDescription,
50 ::std::string const& _debugLogTimestamp,
51 ::BedrockLog::LogCategory _category,
52 ::std::bitset<3> _channels,
53 bool _createLogFile,
54 ::LogSettingsUpdater* _settings,
55 double _logCycleInS
56);
57
58#ifdef LL_PLAT_C
59MCAPI void dumpLogSettingsToLog();
60#endif
61
62MCAPI void flushAllLogs();
63
64MCAPI ::Bedrock::ScopeExit initialize();
65
66MCAPI void initializeLogExtensions();
67
68MCAPI void log_va(
69 ::BedrockLog::LogCategory _category,
70 ::std::bitset<3> channelMask,
71 ::BedrockLog::LogRule rule,
72 ::LogAreaID _area,
73 uint _priority,
74 char const* _function,
75 int _line,
76 char const* _pszFormat,
77 char* argptr
78);
79
80MCAPI int rakDebugLog(char const*, ...);
81
82MCAPI void update();
83
84#ifdef LL_PLAT_S
85MCAPI void updateLogFilter(
86 ::std::unique_ptr<::LogSettingsUpdater> options,
87 ::std::string const& filterType,
88 ::std::vector<::std::string> const& filters,
89 ::std::string& result,
90 bool toggle
91);
92
93MCAPI void updateLogSetting(::std::string const& setting, bool newValue);
94#endif
95
96#ifdef LL_PLAT_C
97MCAPI void updateLogSetting(
98 ::BedrockLog::LogCategory _category,
99 ::BedrockLog::LogChannel _channel,
100 ::std::string const& setting,
101 bool newValue
102);
103#endif
104// NOLINTEND
105
106} // namespace BedrockLog
Definition LogAreaFilter.h:7
Definition ScopeExit.h:7
Definition Path.h:12
Definition LogSettingsUpdater.h:5