This is an automated email from the ASF dual-hosted git repository.
mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j-kotlin.git
The following commit(s) were added to refs/heads/master by this push:
new e7e6dc0 Add catching and throwing
new 6a08a3b Merge pull request #33 from
rocketraman/issue-32-catching-throwing
e7e6dc0 is described below
commit e7e6dc0ac1d7b2a59ed3eb26e620460cb7d6552c
Author: Raman Gupta <[email protected]>
AuthorDate: Fri Feb 10 02:25:46 2023 -0500
Add catching and throwing
---
.../org/apache/logging/log4j/kotlin/KotlinLogger.kt | 16 ++++++++++++++++
src/changelog/.1.x.x/32-Catching_Throwing.xml | 10 ++++++++++
2 files changed, 26 insertions(+)
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 @@ class KotlinLogger(val delegate: ExtendedLogger) {
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>