Skip to content

SpaceAfterYou/swp-logger-redirector

Repository files navigation

Stand With Ukraine

SoulWorker Plugin: Logger Redirector

What the...

This is an example of a plugin for the plugin loader. It can also be useful when developing your own plugins. Its task is to redirect the game logs to spdlog

image

How to

First of all, after the first launch of the game with the loader, in the folder with the game there will be a file: configs/loader.json.

{
  // ...

  "console": {
    // An optional step. This will enable the terminal.
    // Without it, the output will only go to a file in the logs folder.
    // With this both to the terminal and to the file.
    "use": true,

    // This will prevent the terminal closing,
    // after the game is closed.
    "leave": true,
  },

  // Logging level.
  "logger": {
    "level": "trace"
  }

  // ...
}

The available logging levels can be found in the source code of spdlog

  • Unpack the latest available archive from the release page into your game folder. Replace the files if necessary
  • Also, you need to install a plugin launcher or something else to run the game with plugin support.

For Developers

  • vcpkg is needed for dependency management. If you don't want to fuck with it (GLHF), you can install dependencies yourself. They are listed in the vcpkg.json file under the dependencies property

Your place is here

Discord