Add catching and throwing
diff --git a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
index 277f388..6d66536 100644
--- a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
+++ b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
@@ -133,6 +133,22 @@
delegate.logIfEnabled(FQCN, level, marker, supplier.asLog4jSupplier(), t)
}
+ fun catching(level: Level, throwable: Throwable) {
+ delegate.catching(level, throwable)
+ }
+
+ fun catching(throwable: Throwable) {
+ delegate.catching(throwable)
+ }
+
+ fun throwing(level: Level, throwable: Throwable) {
+ delegate.throwing(level, throwable)
+ }
+
+ fun throwing(throwable: Throwable) {
+ delegate.throwing(throwable)
+ }
+
fun trace(marker: Marker, msg: Message) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, null)
}
diff --git a/src/changelog/.1.x.x/32-Catching_Throwing.xml b/src/changelog/.1.x.x/32-Catching_Throwing.xml
new file mode 100644
index 0000000..45fcb87
--- /dev/null
+++ b/src/changelog/.1.x.x/32-Catching_Throwing.xml
@@ -0,0 +1,10 @@
+<entry xmlns="http://logging.apache.org/log4j/changelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ type="changed">
+ <issue id="32" link="https://github.com/apache/logging-log4j-kotlin/issues/32"/>
+ <author id="rgupta"/>
+ <description format="asciidoc">
+ Add missing log4j2 `catching` and `throwing` API methods in `KotlinLogger`.
+ </description>
+</entry>