aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/logging
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/logging')
-rw-r--r--NorthstarDLL/logging/logging.cpp10
-rw-r--r--NorthstarDLL/logging/logging.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/NorthstarDLL/logging/logging.cpp b/NorthstarDLL/logging/logging.cpp
index f88928e1..53795ef0 100644
--- a/NorthstarDLL/logging/logging.cpp
+++ b/NorthstarDLL/logging/logging.cpp
@@ -28,6 +28,7 @@ namespace NS::log
std::shared_ptr<ColoredLogger> echo;
std::shared_ptr<ColoredLogger> NORTHSTAR;
+ std::shared_ptr<ColoredLogger> PLUGINSYS;
}; // namespace NS::log
// This needs to be called after hooks are loaded so we can access the command line args
@@ -148,6 +149,11 @@ void InitialiseConsole()
}
}
+void RegisterLogger(std::shared_ptr<ColoredLogger> logger)
+{
+ loggers.push_back(logger);
+}
+
void RegisterCustomSink(std::shared_ptr<CustomSink> sink)
{
for (auto& logger : loggers)
@@ -189,6 +195,8 @@ void InitialiseLogging()
NS::log::rpak = std::make_shared<ColoredLogger>("RPAK_FSYS", NS::Colors::RPAK);
NS::log::echo = std::make_shared<ColoredLogger>("ECHO", NS::Colors::ECHO);
+ NS::log::PLUGINSYS = std::make_shared<ColoredLogger>("PLUGINSYS", NS::Colors::PLUGINSYS);
+
loggers.push_back(NS::log::SCRIPT_UI);
loggers.push_back(NS::log::SCRIPT_CL);
loggers.push_back(NS::log::SCRIPT_SV);
@@ -198,6 +206,8 @@ void InitialiseLogging()
loggers.push_back(NS::log::NATIVE_SV);
loggers.push_back(NS::log::NATIVE_EN);
+ loggers.push_back(NS::log::PLUGINSYS);
+
loggers.push_back(NS::log::fs);
loggers.push_back(NS::log::rpak);
loggers.push_back(NS::log::echo);
diff --git a/NorthstarDLL/logging/logging.h b/NorthstarDLL/logging/logging.h
index 1cfc6644..2efee80b 100644
--- a/NorthstarDLL/logging/logging.h
+++ b/NorthstarDLL/logging/logging.h
@@ -100,10 +100,13 @@ namespace NS::log
extern std::shared_ptr<ColoredLogger> NORTHSTAR;
+ extern std::shared_ptr<ColoredLogger> PLUGINSYS;
+
void FlushLoggers();
}; // namespace NS::log
void RegisterCustomSink(std::shared_ptr<CustomSink> sink);
+void RegisterLogger(std::shared_ptr<ColoredLogger> logger);
inline bool g_bSpdLog_UseAnsiColor = true;