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/platform/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
14namespace Bedrock { class ScopeExit; }
15namespace BedrockLog { class LogAreaFilter; }
16namespace 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_C 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 void closeAndResetAllLogs();
42
43MCAPI void createLog(
44 ::Core::Path const& _path,
45 ::std::string const& _labelDescription,
46 ::std::string const& _debugLogTimestamp,
47 ::BedrockLog::LogCategory _category,
48 ::std::bitset<3> _channels,
49 bool _createLogFile,
50 ::LogSettingsUpdater* _settings,
51 double _logCycleInS
52);
53
54MCAPI_C ::Bedrock::ScopeExit initialize();
55
56MCAPI void log_va(
57 ::BedrockLog::LogCategory _category,
58 ::std::bitset<3> channelMask,
59 ::BedrockLog::LogRule rule,
60 ::LogAreaID _area,
61 uint _priority,
62 char const* _function,
63 int _line,
64 char const* _pszFormat,
65 char* argptr
66);
67
68MCAPI int rakDebugLog(char const*, ...);
69
70MCAPI_S void updateLogFilter(
71 ::std::unique_ptr<::LogSettingsUpdater> options,
72 ::std::string const& filterType,
73 ::std::vector<::std::string> const& filters,
74 ::std::string& result,
75 bool toggle
76);
77
78MCAPI_C void updateLogSetting(
79 ::BedrockLog::LogCategory _category,
80 ::BedrockLog::LogChannel _channel,
81 ::std::string const& setting,
82 bool newValue
83);
84// NOLINTEND
85
86// static variables
87// NOLINTBEGIN
88MCAPI ::std::bitset<3> const& sGlobalChannel();
89// NOLINTEND
90
91} // namespace BedrockLog
Definition LogAreaFilter.h:7
Definition ScopeExit.h:7
Definition Path.h:10
Definition LogSettingsUpdater.h:10