-
Notifications
You must be signed in to change notification settings - Fork 428
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
Selectively disable type converter registration (was: Unexpected logging message) #451
Comments
Hi, yes that is strange. As you said, picocli does not use any logging library, not even Is it possible picocli created an instance of your domain object, which (directly or indirectly) does logging in its constructor? |
It turns out it produced when executing this line
I think that triggers some drivers provided by other deps. I also find all that converters a bit overkill. Is there anyway to override the default |
This is still very odd. All that the picocli code does is load the About making converter registration configurable: currently it isn't, but I would not object to adding some mechanism to selectively disable registration of some built-in converters. Perhaps via a system property; for example if |
Not sure about that. I think it's the caused by the Apache Ignite deps in my project.
If so I would propose |
What would |
It would be applied only the classes specified |
I can see the need for selectively excluding some of the built-in type converters (for example to suppress this strange logging you are experiencing), but I don't see how it would be useful to have a system property that excludes all converters by default and only includes some specified ones. Can you explain the use case behind this? |
To clarify: I'm okay with the |
Yes, I was suggesting to have a precise control on the converter classes include. Having a I know it's a bit paranoid, but IMO adding not required converts, in particular via reflection, just add an unneeded overhead startup time and may cause unexpected side effects, as the one reported. |
The It’s not obvious for users which converters are loaded via reflection and which aren’t. So, if we do this, these properties should probably be effective for all converters. Do you agree? |
Thinking twice, IMO it would make more sense to allow to specify the |
I’m not ready to make |
This will be included in the upcoming 3.6.1 release. |
Migrating an app to picocli (3.5.2) I'm getting the following unexpected logging message.
That's generated while instantiating the top
CommandLine
instance. Is there's any reason about that? It looks quite weird because at my knowledge picocli does not use any logging library.The text was updated successfully, but these errors were encountered: