[
https://issues.apache.org/jira/browse/LOG4J2-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Caleb Cushing updated LOG4J2-2971:
----------------------------------
Description:
I suspect this would be an API breaking change, but it seems like the `Level`
class should be an enum instead. I don't really understand why it's not. Tried
to write this code with picocli only to be surprised when it didn't work.
this means that picocli and many libraries wouldn't be able to simply generate
options. In this case I'll have to do quite a bit more work to tell picocli all
the possible values.
was:
I suspect this would be an API breaking change, but it seems like the `Level`
class should be an enum instead. I don't really understand why it's not. Tried
to write this code with picocli only to be surprised when it didn't work.
```java
@CommandLine.Option( names = { "--level"}, defaultValue = "error",
showDefaultValue = CommandLine.Help.Visibility.ALWAYS, description = "enable
debug logging" ) private Level logLevel = Level.ERROR;
```
this means that picocli and many libraries wouldn't be able to simply generate
options. In this case I'll have to do quite a bit more work to tell picocli all
the possible values.
> Level as Enum
> -------------
>
> Key: LOG4J2-2971
> URL: https://issues.apache.org/jira/browse/LOG4J2-2971
> Project: Log4j 2
> Issue Type: New Feature
> Reporter: Caleb Cushing
> Priority: Major
>
> I suspect this would be an API breaking change, but it seems like the `Level`
> class should be an enum instead. I don't really understand why it's not.
> Tried to write this code with picocli only to be surprised when it didn't
> work.
> this means that picocli and many libraries wouldn't be able to simply
> generate options. In this case I'll have to do quite a bit more work to tell
> picocli all the possible values.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)