Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

IllegalArgumentException: No enum constant com.pszymczyk.consul.LogLevel.ERROR #120

Open
nolequen opened this issue May 25, 2022 · 2 comments · May be fixed by #123
Open

IllegalArgumentException: No enum constant com.pszymczyk.consul.LogLevel.ERROR #120

nolequen opened this issue May 25, 2022 · 2 comments · May be fixed by #123

Comments

@nolequen
Copy link

I'm getting the error when running embedded-consul 2.2.1 with latest Consul version (1.12.0) if Consul produces some errors.

[ERROR] embedded-consul - com.pszymczyk.consul.ConsulStarter: logging error: java.lang.IllegalArgumentException: No enum constant com.pszymczyk.consul.LogLevel.ERROR
at java.base/java.lang.Enum.valueOf(Enum.java:273)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1491)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:62)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:196)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:216)
at com.pszymczyk.consul.LogLevel.valueOf(LogLevel.groovy)
at com.pszymczyk.consul.LogLevel$valueOf.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
at com.pszymczyk.consul.ConsulLogHandler.parseConsulLog(ConsulLogHandler.groovy:41)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)

@danielkwinsor
Copy link

danielkwinsor commented Aug 11, 2022

Same
ConsulLogHandler is trying to do
currentLevel = LogLevel.valueOf(levelToken) ?: LogLevel.INFO

TheDevOps added a commit to TheDevOps/embedded-consul that referenced this issue Sep 14, 2022
TheDevOps added a commit to TheDevOps/embedded-consul that referenced this issue Sep 14, 2022
@TheDevOps TheDevOps linked a pull request Sep 14, 2022 that will close this issue
@TheDevOps
Copy link

TheDevOps commented Sep 14, 2022

I created a minimal risk pull request just adding "error" in addition to not break older versions that still use "err"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants