diff --git a/logstage/logstage-core/.jvm/src/main/scala/izumi/logstage/adapter/jul/LogstageJulLogger.scala b/logstage/logstage-core/.jvm/src/main/scala/izumi/logstage/adapter/jul/LogstageJulLogger.scala index a77af5cf92..f3169fc4b3 100644 --- a/logstage/logstage-core/.jvm/src/main/scala/izumi/logstage/adapter/jul/LogstageJulLogger.scala +++ b/logstage/logstage-core/.jvm/src/main/scala/izumi/logstage/adapter/jul/LogstageJulLogger.scala @@ -19,7 +19,8 @@ import scala.collection.compat.immutable.ArraySeq class LogstageJulLogger(router: LogRouter) extends java.util.logging.Handler with JULTools with AutoCloseable { override def publish(record: LogRecord): Unit = { val level = toLevel(record) - if (router.acceptable(Log.LoggerId(record.getLoggerName), level)) { + val loggerName = record.getLoggerName match { case null => "null"; case s => s } + if (router.acceptable(Log.LoggerId(loggerName), level)) { router.log(mkEntry(record)) } }