Draft
Conversation
# Conflicts: # cli/src/main/java/com/devonfw/tools/ide/cli/Ideasy.java
renamed TestLogger to IdeLoggerAdapter added missing param to javadoc renamed TestProvider to TestProviderImpl renamed TestLoggerFactory to TestLoggerFactoryImpl
added first implementations for IdeLoggerAdapter methods replaced IdeSubLoggerSlf4j with IdeSubLoggerOut
added null checks to IdeLoggerAdapter debug methods
added rest of null checks
removed unused code
# Conflicts: # cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java
set loggingContext to private added getter for loggingContext added check to ignore WireMock specific log messages removed logback-classic from dependencies
# Conflicts: # cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java # gui/src/main/java/com/devonfw/ide/gui/MainController.java
Collaborator
Pull Request Test Coverage Report for Build 22264313095Details
💛 - Coveralls |
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.
This PR fixes #404
Implemented changes:
IdeLogger.get()method.Markersclass to mimic custom IDEasy log-levels in SLF4J via accordingMarkerinstances.Slf4jLoggerAdaptercreatejava.util.logging.Loggerfor external loggers and useIdeLoggerfor internal ones and route log messages accordingly.IdeSystemImplto use static SLF4J logger instead of injectingIdeLoggerinto constructor.IdeSystemImpl.We still need to verify that 3rd party code now does not log into our regular console output in production usage. I would currently guess that this will happen and consider it a bug that needs to be fixed before merge.Solved. However, I have a problem that ProcessBuilder is automatically logging a new RuntimeException due to a bug in the JDK (
java.util.loggingdoes not handle log-level threshold correct). I am trying to trace this down but it seems to be deeply hidden in the JDK logging system and since I activate java.util.logging but ProcessBuilder logs via java.util.logging and not via SLF4J I cannot hook in between.FYI: With this feature we could now even implement that IdeLoggerImpl can delegate tojava.util.logging.Loggerif some special global option is activated and we could also instructjava.util.loggingto additionally write a log file to preserve log information for later lookup.Already implemented - I used a new variable that is active by default and can be disabled by the user.
Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal