Update logging configuration to fix jade about loggers --test - #12
Merged
Conversation
jade about loggers --test
`jade about loggers` was broken, so it has been updated in 2 ways: 1. When the `--test` flag is set, it is supposed to cause each registered logger to print a message at a particular log level. However, this was not working as `parsedName` interpolated the log level instead of the log level name. 2. Instead of printing all available loggers, it only prints the loggers created by Jade. This is because external dependencies also had their own loggers, which adds noise to the output. If you do wish to see those loggers from the external dependencies, use the `--all` flag. Also added config for the FILE appender in logback.xml so that it logs to the logs/ directory. Additionally, some TODOs were tackled too: - Use `BuildInformation.group` instead of hardcoding org.ucombinator.jade. - Set `DynamicCallerConverter`'s depth config fields to private. - Add KDoc for `Log`.
leslieyip02
force-pushed
the
fix/logback-setup
branch
from
September 8, 2026 05:00
34c74bf to
f1732ae
Compare
Contributor
Author
|
Removed the old logic to scan the Jade JAR. The older JAR scanning logic detected 2 extra loggers: But this is because I took out Added a TODO for this limitation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running commands with
--log=debugor any log level (e.g.jade --log=debug decompile *.class .), the logs of the corresponding levels aren't printed. When runningjade about loggers --test, there are no logs printed for any of the loggers:This was caused because the logger name parsing logic incorrectly interpolated
levelinstead ofname:jade/src/main/kotlin/org/ucombinator/jade/main/Main.kt
Lines 140 to 149 in 2dc48dd
This has been fixed:
Furthermore, instead of printing all available loggers,
jade about loggersnow only prints the loggers created by Jade. This is because external dependencies also had their own loggers, which adds noise to the output. Listing the loggers of external dependencies may or may not be useful, so this functionality has been gated behind the--alllflag.I also added an option
--log-to-fileso that it logs to thelogs/directory when the flag is set.Additionally, some TODOs were tackled too:
BuildInformation.groupinstead of hardcodingorg.ucombinator.jade.DynamicCallerConverter's depth config fields toprivate.Log.The default log level was also set to
INFOso that debug logs from external dependencies aren't logged on every command: