Skip to content

#187 Fix logging configuration for JAR product#229

Merged
ndoschek merged 3 commits intomasterfrom
issues/187
Jul 8, 2022
Merged

#187 Fix logging configuration for JAR product#229
ndoschek merged 3 commits intomasterfrom
issues/187

Conversation

@ndoschek
Copy link
Copy Markdown
Member

@ndoschek ndoschek commented Jul 5, 2022

  • Update log configuration
    • If file path is given, reconfigure logging based on this configuration
    • Default case configures console logging to level INFO, no file logging
  • Add ExampleServerLauncher.launch configuration that uses the example log configuration (console and file logging at level info)
  • Remove log configuration files from classpath to avoid unwanted configuration aggregation
  • Fix performance warning that causes log42j logging issue if executed in bundled jar
  • Switch to import instead of require plugin bundles for log4j dependencies
  • Update lib dependencies
    • Do not exclude source libs to improve debugging experiences in p2 use case
  • Update README
    • Update logging section
    • Format via markdownlint and remove markdownlint warnings
    • Update import project section and remove outdated information
  • targetplatform project
    • Include targetplatform as module of releng parent project to be able to import all projects as maven projects without exception
    • Remove unused targetplatform profile

Part of #187

Please also have a look at eclipse-emfcloud/emfcloud-modelserver-theia#110

- Update log configuration
  - If file path is given, reconfigure logging based on this configuration
  - Default case configures console logging to level INFO, no file logging
- Add ExampleServerLauncher.launch configuration that uses the example log configuration (console and file logging at level info)
- Remove log configuration files from classpath to avoid unwanted configuration aggregation
- Fix performance warning that causes log42j logging issue if executed in bundled jar
- Switch to import instead of require plugin bundles for log4j dependencies
- Update lib dependencies
  - Do not exclude source libs to improve debugging experiences in p2 use case
- Update README
  - Update logging section
  - Format via markdownlint and remove markdownlint warnings
  - Update import project section and remove outdated information
- targetplatform project
  - Include targetplatform as module of releng parent project to be able to import all projects as maven projects without exception
  - Remove unused targetplatform profile

Part of #187
Copy link
Copy Markdown
Contributor

@cdamus cdamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that is a thorough clean-up for developer usability. Thanks!

I do have a few quibbles in comments in-line. Also, there's a problem in the formatting in the new README:

CleanShot 2022-07-07 at 18 25 45@2x

This section lost the fence around the code block and all of the indentation within it.

Comment thread bundles/org.eclipse.emfcloud.modelserver.emf/META-INF/MANIFEST.MF Outdated
Comment thread tests/org.eclipse.emfcloud.modelserver.emf.tests/META-INF/MANIFEST.MF Outdated
- Update log4j version range
- Update README
- example: Switch log4j-slf4j-impl dependency for modelserver.lib to avoid warning on startup
@ndoschek
Copy link
Copy Markdown
Member Author

ndoschek commented Jul 8, 2022

Thanks a lot for you review @cdamus, I addressed your comments with a separate commit, would be great if you could have another quick look, thanks again!

@ndoschek ndoschek requested a review from cdamus July 8, 2022 13:36
- Previous mirror seems to be out of maintenance since 2017
Copy link
Copy Markdown
Contributor

@cdamus cdamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ndoschek! LGTM.

public static void configureLogger(final Optional<String> configurationFilePath) {
if (configurationFilePath.isPresent()) {
protected static void configureLogger(final String configurationFilePath) {
if (configurationFilePath != null && !configurationFilePath.isEmpty()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on the present-but-empty string! 😀

@ndoschek ndoschek merged commit 74f9937 into master Jul 8, 2022
@ndoschek ndoschek deleted the issues/187 branch July 8, 2022 14:31
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.

2 participants