Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log levels #1208

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Log levels #1208

wants to merge 3 commits into from

Conversation

Fleeym
Copy link
Contributor

@Fleeym Fleeym commented Jan 6, 2025

This PR implements log levels, which are configurable from in-game in the Geode settings.

  • There are separate log levels for the platform console and for the log files
    • platform console default: info
    • log file default: warn
  • To achieve this result, I had to play around in geodeEntry(), and moved the Logger::setup() after the internal loader mod is setup, since we need access to the mod settings.
    • To assure no logs are lost, I still stored the logs in Logger::m_logs, and spit them out when calling Logger::setup()
  • I also changed log levels for some messages Geode logs when loading mods
    • Most specific messages ("unzipping file", "Loading binary", "Loading hook ...") were set to debug
    • Most general level messages ("Loading mod x", "Loading resources", "Setting up crash handler", ...) were set as log::info
    • Some messages that were supposed to be warnings / errors were set to debug
  • Log levels can be changed dynamically, and applying the settings will update them immediately (old logs that do not fit the new filter will not be deleted, however). New logs will respect the newly applied settings.

I would mostly like feedback about the default log levels I have set, not sure if info for the ingame console and warn for the log files is a fine choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant