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

fix: logging file creation from jars and package #658

Merged

Conversation

credmond
Copy link
Contributor

@credmond credmond commented Oct 18, 2023

Fixed logging file, which previously only worked from an IDE / local run outside of a JAR. This bug was introduced in 2021; #371. The approach (setting a file property) did not work, as the JDK's LogManager failed to find the file -- inside a jar -- and silently fails (frustratingly), resulting in no logging config at all. That is not how that property is intended to be used (an external file is assumed as FileInputStream is used). Another approach that would work is to use java.util.logging.config.class and specify a class (with the job of setting properties). This fix is a shortcut to basically do the same thing.

Issue

No logging file was created nor logged to.

Fixes #661

As per commit message.

Progress

…outside of a JAR. This bug was introduced in 2021; gluonhq#371. The approach (setting a file properly) did not work, as the JDK's LogManager failed to find the file -- inside a jar -- and silently fails (frustratingly), resulting in no logging config at all. That is not how that property is intended to be used (an external file is assumed as FileInputStream is used). Another approach is to use java.util.logging.config.class and specify a class (with a job of setting properties).
@abhinayagarwal abhinayagarwal changed the title Fix: logging file, which previously only worked from an IDE / local run fix: logging file creation from jars and packages Oct 24, 2023
@abhinayagarwal
Copy link
Collaborator

I have tested the fix against source, jar and dmg package. It runs under all conditions.

abhinayagarwal
abhinayagarwal previously approved these changes Oct 24, 2023
@credmond
Copy link
Contributor Author

I have tested the fix against source, jar and dmg package. It runs under all conditions.

Thank you!

@credmond credmond changed the title fix: logging file creation from jars and packages fix: log file created when running from JAR Oct 24, 2023
@credmond credmond changed the title fix: log file created when running from JAR fix: logging file creation from jars and package Oct 24, 2023
@credmond
Copy link
Contributor Author

credmond commented Oct 24, 2023

Sorry @abhinayagarwal , I renamed the title after you renamed it (I didn't realise you had changed it -- I thought it was my original), I put it back to your version... :)

@abhinayagarwal abhinayagarwal merged commit 3f3881e into gluonhq:master Oct 25, 2023
3 checks passed
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.

Logging is failing
2 participants