Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
1.0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
sokomishalov committed Dec 9, 2019
1 parent b6f3c87 commit 68bc383
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions commons-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>
</parent>

<artifactId>commons-core</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>

<properties>
<kotlin.version>1.3.61</kotlin.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2019-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ru.sokomishalov.commons.core.log

import org.slf4j.Logger
Expand All @@ -6,12 +21,12 @@ import org.slf4j.Logger
* @author sokomishalov
*/

fun Logger.info(lazyMessage: () -> String) = info(lazyMessage())
fun Logger.info(lazyMessage: () -> String) = if (isInfoEnabled) info(lazyMessage()) else Unit

fun Logger.debug(lazyMessage: () -> String) = debug(lazyMessage())
fun Logger.debug(lazyMessage: () -> String) = if (isDebugEnabled) debug(lazyMessage()) else Unit

fun Logger.warn(lazyMessage: () -> String) = warn(lazyMessage())
fun Logger.warn(lazyMessage: () -> String) = if (isWarnEnabled) warn(lazyMessage()) else Unit

fun Logger.trace(lazyMessage: () -> String) = trace(lazyMessage())
fun Logger.trace(lazyMessage: () -> String) = if (isTraceEnabled) trace(lazyMessage()) else Unit

fun Logger.error(throwable: Throwable, lazyMessage: () -> String) = error(lazyMessage(), throwable)
fun Logger.error(throwable: Throwable, lazyMessage: () -> String) = if (isErrorEnabled) error(lazyMessage(), throwable) else Unit
6 changes: 3 additions & 3 deletions commons-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>
</parent>

<artifactId>commons-spring</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>

<properties>
<kotlin.version>1.3.61</kotlin.version>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-core</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>
<packaging>pom</packaging>

<properties>
Expand Down

0 comments on commit 68bc383

Please sign in to comment.