diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ffaaf1bda1..b6cfde934c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,11 @@ Breaking API Changes * util-core: `Future.unapply` has been removed. Use `Future.poll` to retrieve Future's state. ``PHAB_ID=D427429`` +Bug Fixes +~~~~~~~~~ + +* util-logging: Add a missing `_*` that could result in exceptions when using the + `Logger.apply(Level, Throwable, String, Any*)` signature. ``PHAB_ID=D430122`` 20.1.0 ------ diff --git a/util-logging/src/main/scala/com/twitter/logging/Logger.scala b/util-logging/src/main/scala/com/twitter/logging/Logger.scala index 0319f9ac56..a703afb050 100644 --- a/util-logging/src/main/scala/com/twitter/logging/Logger.scala +++ b/util-logging/src/main/scala/com/twitter/logging/Logger.scala @@ -83,7 +83,7 @@ class Logger protected (val name: String, private val wrapped: javalog.Logger) { final def apply(level: Level, message: String, items: Any*): Unit = log(level, message, items: _*) final def apply(level: Level, thrown: Throwable, message: String, items: Any*): Unit = - log(level, thrown, message, items) + log(level, thrown, message, items: _*) // convenience methods: @varargs diff --git a/util-logging/src/test/scala/com/twitter/logging/LoggerTest.scala b/util-logging/src/test/scala/com/twitter/logging/LoggerTest.scala index 354b3c01f6..159d07f838 100644 --- a/util-logging/src/test/scala/com/twitter/logging/LoggerTest.scala +++ b/util-logging/src/test/scala/com/twitter/logging/LoggerTest.scala @@ -205,7 +205,9 @@ class LoggerTest extends WordSpec with TempFolder with BeforeAndAfter { "log & trace a message with percent signs" in { traceLogger(Level.INFO) Logger.get("")(Level.INFO, "%i") + Logger.get("")(Level.INFO, new Exception(), "%j") mustLog("%i") + mustLog("%j") } "log a message, with timestamp" in {