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

Add log4j logging #388

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Add log4j logging #388

merged 1 commit into from
Nov 29, 2024

Conversation

dr0i
Copy link
Member

@dr0i dr0i commented Nov 28, 2024

Enables java logging. The log level can be changed by setting a variable. Set and run like this:
JAVA_OPTS="-Dorg.metafacture.metafix.logLevel=DEBUG"; ./gradlew installDist; cd metafix-runner/build/install/metafix-runner; bin/metafix-runner $pathTo.flux

See #383.

Substitutes #387.

Copy link
Member

@blackwinter blackwinter left a comment

Choose a reason for hiding this comment

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

The usage instructions are wrong, though. You either have to export the JAVA_OPTS variable (which means it applies during the whole shell session, until reset or unset) or prefix the runner command with it:

  1. export JAVA_OPTS=...; bin/metafix-runner ...
  2. JAVA_OPTS=... bin/metafix-runner ...

Also note that one can't change the log level this way when running directly via Gradle (./gradlew :metafix-runner:run ...), it only works within the distribution.

@blackwinter blackwinter assigned dr0i and unassigned blackwinter Nov 28, 2024
@dr0i dr0i force-pushed the 383-enableLog4jLogging branch from f8b3843 to ccbd741 Compare November 29, 2024 15:26
Enables java logging. The log level can be changed by setting a variable.
Set and run like this:

export JAVA_OPTS="-Dorg.metafacture.metafix.logLevel=DEBUG"; ./gradlew installDist;  cd metafix-runner/build/install/metafix-runner; bin/metafix-runner $pathTo.flux

Note that you cannot use `./gradlew :metafix-runner:run ...` as setting
the log level only works within the distribution.

Co-authored-by: Jens Wille <[email protected]>
@dr0i dr0i force-pushed the 383-enableLog4jLogging branch from ccbd741 to c5aacab Compare November 29, 2024 15:49
@dr0i dr0i merged commit 27560cf into master Nov 29, 2024
1 check passed
@dr0i dr0i deleted the 383-enableLog4jLogging branch November 29, 2024 16:32
blackwinter added a commit that referenced this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants