CommonLibSSE NG
Loading...
Searching...
No Matches
ErrorLogger.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSTEvent.h"
4#include "RE/B/BSTHashMap.h"
5
6namespace RE
7{
8 namespace BSScript
9 {
10 struct LogEvent;
11
12 class ErrorLogger : public BSTEventSource<LogEvent>
13 {
14 public:
15 inline static constexpr auto RTTI = RTTI_BSScript__ErrorLogger;
16
17 enum class Severity
18 {
19 kInfo,
21 kError,
22 kFatal
23 };
24
26 {
27 public:
28 // members
29 std::uint32_t fatalCount; // 0
30 std::uint32_t errorCount; // 4
31 std::uint32_t warningCount; // 8
32 };
33 static_assert(sizeof(PerThreadErrorCounts) == 0xC);
34
35 virtual ~ErrorLogger(); // 00
36
37 // add
38 virtual void PostErrorImpl(const char* a_message, Severity a_severity) = 0; // 01
39 virtual void ResetImpl(); // 02 - { return; }
40
41 // members
44 };
45 static_assert(sizeof(ErrorLogger) == 0x98);
46 }
47}
Definition ErrorLogger.h:13
virtual void PostErrorImpl(const char *a_message, Severity a_severity)=0
Severity
Definition ErrorLogger.h:18
virtual void ResetImpl()
BSTHashMap< std::uint32_t, PerThreadErrorCounts > threadErrors
Definition ErrorLogger.h:43
BSSpinLock threadErrorsLock
Definition ErrorLogger.h:42
static constexpr auto RTTI
Definition ErrorLogger.h:15
Definition BSAtomic.h:49
Definition BSTEvent.h:19
Definition BSTHashMap.h:21
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BSScript__ErrorLogger(689021, 396876, 0x1f49998)
std::uint32_t warningCount
Definition ErrorLogger.h:31
std::uint32_t errorCount
Definition ErrorLogger.h:30
std::uint32_t fatalCount
Definition ErrorLogger.h:29