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

--quiet still shows INFO logs for JShell when using Docker #1831

Open
loicmathieu opened this issue Aug 16, 2024 · 2 comments · May be fixed by #1841
Open

--quiet still shows INFO logs for JShell when using Docker #1831

loicmathieu opened this issue Aug 16, 2024 · 2 comments · May be fixed by #1841
Labels
bug Something isn't working

Comments

@loicmathieu
Copy link

Describe the bug
When using --quiet only error logs should be displayed.
But when using a JShell script two logs are still emitted when launching JBang from Docker:

Aug 16, 2024 12:25:34 PM java.util.prefs.FileSystemPreferences$1 run
NFO: Created user preferences directory.

To Reproduce
Create this script in a test.jsh file:

System.out.println("Hello World!");

Launch it via Docker with --quiet:

docker run -v `pwd`:/ws --workdir=/ws -ti jbangdev/jbang-action --quiet test.jsh

Expected behavior
No INFO logs should be displayed when running with --quiet in Docker.

JBang version

[jbang] [0:282] jbang version 0.117.1
Cache: /jbang/.jbang/cache
Config: /jbang/.jbang
Repository: /root/.m2/repository
Java: /opt/java/openjdk [11.0.11]
OS: linux
Arch: x64
Shell: bash
0.117.1
@loicmathieu loicmathieu added the bug Something isn't working label Aug 16, 2024
@quintesse
Copy link
Contributor

This is actually not JBang giving that message, but it's the JVM itself.

But I'm guessing that the message will always appear on any invocation of a the action so we should probably prevent it from displaying.

The easiest way would be to simply create that folder inside the docker image when the action gets built.

Another option would be to suppress JVM info messages, but I feel that's not something that JBang should be doing (some users might actually want those messages).

@loicmathieu
Copy link
Author

The easiest way would be to simply create that folder inside the docker image when the action gets built.

I think it's a good idea ;)

@maxandersen maxandersen linked a pull request Sep 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants