-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e25eeb0
commit 68e7c92
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
hildr-node/src/main/java/io/optimism/cli/typeconverter/LogLevelConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.optimism.cli.typeconverter; | ||
|
||
import ch.qos.logback.classic.Level; | ||
import picocli.CommandLine; | ||
|
||
/** | ||
* the Log Level converter, used for picocli parse args. | ||
* | ||
* @author thinkAfCod | ||
* @since 0.2.0 | ||
*/ | ||
public class LogLevelConverter implements CommandLine.ITypeConverter<ch.qos.logback.classic.Level> { | ||
|
||
/** the LogLevelConverter constructor. */ | ||
public LogLevelConverter() {} | ||
|
||
@Override | ||
public Level convert(String value) throws Exception { | ||
return Level.valueOf(value); | ||
} | ||
} |