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

Enable the runner to select debug level. #383

Closed
TobiasNx opened this issue Nov 7, 2024 · 8 comments
Closed

Enable the runner to select debug level. #383

TobiasNx opened this issue Nov 7, 2024 · 8 comments
Assignees

Comments

@TobiasNx
Copy link
Collaborator

TobiasNx commented Nov 7, 2024

Also metafacture-runner/src/main/dist/config/java-options.conf.
It seems that the core included runner can adjust this.
BUT the metafix runner cannot do this.

Originally posted by @TobiasNx in metafacture/metafacture-core#536 (comment)

The Metafix Runner is not able to set the config level to DEBUG.

@TobiasNx TobiasNx changed the title Also metafacture-runner/src/main/dist/config/java-options.conf. It seems that the core included runner can adjust this. BUT the metafix runner cannot do this. Enable the runner to select debug level. Nov 7, 2024
@blackwinter
Copy link
Member

See my earlier comment in #371.

@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Nov 7, 2024

So we have to sit this one out until core and fix are merged?

@TobiasNx
Copy link
Collaborator Author

Creating a config folder in the bin folder with the log4j.xml does not do the trick. @fsteeg suggested it to try it our.

@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Nov 21, 2024

Does it make sense to adjust the runner build to the core one? There are a lot of advantages to this. Since the runner would have examples and Java Options would be available. etc.

dr0i added a commit that referenced this issue Nov 21, 2024
WIP just showing that something works to log debug level
@dr0i
Copy link
Member

dr0i commented Nov 21, 2024

You may want to cherry-pick 47304f9 and log something at debug level.

@dr0i dr0i moved this to Review in Metafacture Nov 21, 2024
@TobiasNx
Copy link
Collaborator Author

The following seems to work:

$ ./gradlew :metafix-runner:run --args="/home/tobias/git/metafacture-core/metafacture-runner/build/install/metafacture-core/examples/morph/marc21/morph-marc21.flux"

> Task :metafix-runner:run
17:18:09.245 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 946638705
17:18:09.261 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Colonial and post-colonial discourse in the novels of Yo§am Sang-So§ap, Chinua Achebe and Salman Rushdie
Colonial and post-colonial discourse in the novels of Yo§am Sang-So§ap, Chinua Achebe and Salman Rushdie17:18:09.265 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.265 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 94685887X
17:18:09.267 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Ostenfelder Bauernhaus : Deutschlands a§�ltestes Freilichtmuseum in Husum

Ostenfelder Bauernhaus : Deutschlands a§�ltestes Freilichtmuseum in Husum17:18:09.268 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.269 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 947459928
17:18:09.270 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Gesellschaftsrecht 1995

Gesellschaftsrecht 199517:18:09.271 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.271 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 948469390
17:18:09.272 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Deathlock : = Todespunkt

Deathlock : = Todespunkt17:18:09.273 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.273 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 950561274
17:18:09.274 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title= Prachtlibellen Europas : Gattung Calopteryx

 Prachtlibellen Europas : Gattung Calopteryx17:18:09.275 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.275 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 950592463
17:18:09.276 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Insolvenzrecht 1996

Insolvenzrecht 199617:18:09.277 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.277 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 950974439
17:18:09.278 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Siciliano

Siciliano17:18:09.279 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.280 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 953176436
17:18:09.281 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Arbeitsrecht 1997

Arbeitsrecht 199717:18:09.282 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.283 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 954369300
17:18:09.284 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Gesellschaftsrecht 1997

Gesellschaftsrecht 199717:18:09.286 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.287 [main] DEBUG org.metafacture.monitoring.StreamLogger -- start record 954377915
17:18:09.290 [main] DEBUG org.metafacture.monitoring.StreamLogger -- literal dc:title=Bankrecht 1998

Bankrecht 199817:18:09.291 [main] DEBUG org.metafacture.monitoring.StreamLogger -- end record
17:18:09.294 [main] DEBUG org.metafacture.monitoring.StreamLogger -- closeStream

[Incubating] Problems report is available at: file:///home/tobias/git/metafacture-fix/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.11.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1s
6 actionable tasks: 1 executed, 5 up-to-date

@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Nov 21, 2024

I am not sure if this is relevant for the change @cboehme had added some comments for the logger dependency in the metafacture core runner gradle file.:

https://github.com/metafacture/metafacture-core/blob/05c8dae5d9f50099defc21147424176b591c8fe8/metafacture-runner/build.gradle#L65-L85

@TobiasNx TobiasNx assigned dr0i and unassigned TobiasNx Nov 21, 2024
dr0i added a commit that referenced this issue Nov 22, 2024
dr0i added a commit that referenced this issue 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

Co-authored-by: Jens Wille <[email protected]>
@dr0i dr0i mentioned this issue Nov 28, 2024
dr0i added a commit that referenced this issue Nov 29, 2024
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 distribztion.

Co-authored-by: Jens Wille <[email protected]>
dr0i added a commit that referenced this issue Nov 29, 2024
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
Copy link
Member

dr0i commented Nov 29, 2024

@TobiasNx how to set the java log level to debug is now documented in the README (look in the setup section).
Closing.

@dr0i dr0i closed this as completed Nov 29, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in Metafacture Nov 29, 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

No branches or pull requests

3 participants