diff options
author | Emma Miler <emma.pi@protonmail.com> | 2023-04-11 20:49:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 20:49:16 +0200 |
commit | 450d0b1ed437cf37b4309af952af8904f3f07768 (patch) | |
tree | 3f0fd39b5663b5c3f4b9e76c70cc4987f22d66c7 /NorthstarDLL/logging/logging.cpp | |
parent | 72da1da5b4c04ccc1154853a308cab6459c60b79 (diff) | |
download | NorthstarLauncher-450d0b1ed437cf37b4309af952af8904f3f07768.tar.gz NorthstarLauncher-450d0b1ed437cf37b4309af952af8904f3f07768.zip |
Plugin system v2 (#343)
* Some work
* Rewrite gamestate presence
* Add plugin system logger
* Format changes
* Format chjange
* Fix gamestate stuff
* some callback stuff
* move around invite stuff
* move invite to funcs
* fix presence server data
* Actually call InformSQVMCreated
* bruh
* Fix TODO's
* Formatting
* Fix filters
* Add InformDLLLoads
* Fix plugin handle always being 0
* Formatting
* Fix merge issues
* Formatting
* Mods can add files compiled at SQVM init
* Some Small Fixes
* Add changes from review
* Fix load failure
* Add new squirrel functions
* actually call InformSQVMDestroyed
* add CreateObject function
* answers to complaints
* remove snake cases from GameStatePresence
---------
Co-authored-by: cat_or_not <41955154+catornot@users.noreply.github.com>
Diffstat (limited to 'NorthstarDLL/logging/logging.cpp')
-rw-r--r-- | NorthstarDLL/logging/logging.cpp | 10 |
1 files changed, 10 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); |