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

Override server logging level with environment variable #653

Merged
2 commits merged into from May 8, 2022
Merged

Override server logging level with environment variable #653

2 commits merged into from May 8, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 7, 2022

Description

Use LOG_LEVEL environment variable to override logging level for emu.grasscutter (which also contains all loggers under it). This might help with debugging various issues reported by users. Previously, the only way to override these levels would be to use -Dlogback.configurationFile

Issues fixed by this PR

N/A

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

Use `LOG_LEVEL` environment variable to override logging level for `emu.grasscutter` (which also contains all loggers under it). This might help with debugging various issues reported by users. Previously, the only way to override these levels would be to use `-Dlogback.configurationFile`
@ghost
Copy link
Author

ghost commented May 8, 2022

Note that I have decided to remove override for emu.grasscutter.scripts.ScriptLib as it can now be toggled globally.

Going forward I ask all contributors to use TRACE for very verbose logging (such as continuous dumping of avatar state) while reserving DEBUG for verbose informational messages (such as singular important actions like starting/stopping internal timers or handling of incorrect, but expected, states).

Here's example for good TRACE logging:

  • Current avatar motion state %s, stamina %d/%d

Here's example for good DEBUG logging:

  • MOTION_FALL_ON_GROUND received after %dms, discarding

@ghost ghost merged commit 9020ee5 into Grasscutters:development May 8, 2022
@ghost ghost deleted the patch-2 branch May 13, 2022 00:10
Birdulon pushed a commit to Birdulon/Grasscutter that referenced this pull request Aug 21, 2022
…#653)

Use `LOG_LEVEL` environment variable to override logging level for `emu.grasscutter` (which also contains all loggers under it). This might help with debugging various issues reported by users. Previously, the only way to override these levels would be to use `-Dlogback.configurationFile`
This pull request was closed.
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.

None yet

0 participants