We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23f296b commit 26bf5c0Copy full SHA for 26bf5c0
1 file changed
RubyScript/src/org/knime/ext/jruby/LoggerOutputStream.scala
@@ -21,15 +21,11 @@ class LoggerOutputStream(
21
if (str.endsWith("\n")) {
22
str = str.substring(0, str.length - 1)
23
}
24
- if (str.length == 0) return
25
- if (level == NodeLogger.LEVEL.INFO) {
26
- logger.info(str)
27
- } else if (level == NodeLogger.LEVEL.WARN) {
28
- logger.warn(str)
29
- } else if (level == NodeLogger.LEVEL.ERROR) {
30
- logger.error(str)
31
- } else {
32
- logger.debug(str)
+ if (!str.isEmpty()) level match {
+ case NodeLogger.LEVEL.INFO => logger.info(str)
+ case NodeLogger.LEVEL.WARN => logger.warn(str)
+ case NodeLogger.LEVEL.ERROR => logger.error(str)
+ case _ => logger.debug(str)
33
34
35
0 commit comments