aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-utils/src
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2018-06-11 16:54:47 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-08-02 08:51:34 +0200
commit85a59b8d29c6f81720fe3d2e59926740173fcae9 (patch)
tree037e30c559c9aad27c51fbf5109f6ab9587b69c3 /hv-collector-utils/src
parentecf7cb09d4bce389b615257d3323ada0840100e8 (diff)
Implemented rest server in client simulator
Change-Id: I212b79fe2a0272f340c5ca889beff60b469f7f24 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-601
Diffstat (limited to 'hv-collector-utils/src')
-rw-r--r--hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt38
1 files changed, 21 insertions, 17 deletions
diff --git a/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt b/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt
index 19bfa126..f614d426 100644
--- a/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt
+++ b/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt
@@ -44,8 +44,8 @@ class Logger(val logger: org.slf4j.Logger) {
logger.debug(message)
}
- fun debug(message: String, ex: Exception) {
- logger.debug(message, ex)
+ fun debug(message: String, t: Throwable) {
+ logger.debug(message, t)
}
fun debug(messageProvider: () -> String) {
@@ -54,12 +54,13 @@ class Logger(val logger: org.slf4j.Logger) {
}
}
- fun debug(ex: Exception, messageProvider: () -> String) {
+ fun debug(t: Throwable, messageProvider: () -> String) {
if (logger.isDebugEnabled) {
- logger.debug(messageProvider(), ex)
+ logger.debug(messageProvider(), t)
}
}
+
//
// INFO
//
@@ -67,9 +68,6 @@ class Logger(val logger: org.slf4j.Logger) {
logger.info(message)
}
- fun info(message: String, ex: Exception) {
- logger.info(message, ex)
- }
fun info(messageProvider: () -> String) {
if (logger.isInfoEnabled) {
@@ -77,9 +75,14 @@ class Logger(val logger: org.slf4j.Logger) {
}
}
- fun info(ex: Exception, messageProvider: () -> String) {
+ fun info(message: String, t: Throwable) {
+ logger.info(message, t)
+ }
+
+
+ fun info(t: Throwable, messageProvider: () -> String) {
if (logger.isInfoEnabled) {
- logger.info(messageProvider(), ex)
+ logger.info(messageProvider(), t)
}
}
@@ -92,8 +95,8 @@ class Logger(val logger: org.slf4j.Logger) {
logger.warn(message)
}
- fun warn(message: String, ex: Exception) {
- logger.warn(message, ex)
+ fun warn(message: String, t: Throwable) {
+ logger.warn(message, t)
}
fun warn(messageProvider: () -> String) {
@@ -102,9 +105,9 @@ class Logger(val logger: org.slf4j.Logger) {
}
}
- fun warn(ex: Exception, messageProvider: () -> String) {
+ fun warn(t: Throwable, messageProvider: () -> String) {
if (logger.isWarnEnabled) {
- logger.warn(messageProvider(), ex)
+ logger.warn(messageProvider(), t)
}
}
@@ -117,8 +120,9 @@ class Logger(val logger: org.slf4j.Logger) {
logger.error(message)
}
- fun error(message: String, ex: Exception) {
- logger.error(message, ex)
+
+ fun error(message: String, t: Throwable) {
+ logger.error(message, t)
}
fun error(messageProvider: () -> String) {
@@ -127,9 +131,9 @@ class Logger(val logger: org.slf4j.Logger) {
}
}
- fun error(ex: Exception, messageProvider: () -> String) {
+ fun error(t: Throwable, messageProvider: () -> String) {
if (logger.isErrorEnabled) {
- logger.error(messageProvider(), ex)
+ logger.error(messageProvider(), t)
}
}
}