Skip to content

Commit

Permalink
feat: move logging out of common module
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmelati committed Oct 16, 2024
1 parent d1c63f3 commit 8dbb3e5
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 26 deletions.
30 changes: 30 additions & 0 deletions modules/logging/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
plugins {
kotlin("multiplatform") version "2.0.0"
}

group = "com.sphereon.oid.fed"
version = "unspecified"

repositories {
mavenCentral()
}

dependencies {
}

kotlin {
jvm()

js(IR) {
browser()
nodejs()
}

sourceSets {
commonMain {
dependencies {
implementation(libs.kermit.logging)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.sphereon.oid.fed.common.logging

import co.touchlab.kermit.Logger as KermitLogger

object Logger {

fun verbose(tag: String, message: String) {
KermitLogger.v(tag = tag, messageString = message)
}

fun debug(tag: String, message: String) {
KermitLogger.d(tag = tag, messageString = message)
}

fun info(tag: String, message: String) {
KermitLogger.i(tag = tag, messageString = message)
}

fun warn(tag: String, message: String) {
KermitLogger.w(tag = tag, messageString = message)
}

fun error(tag: String, message: String, throwable: Throwable? = null) {
KermitLogger.e(tag = tag, messageString = message, throwable = throwable)
}
}

This file was deleted.

9 changes: 9 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ pluginManagement {
gradlePluginPortal()
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

dependencyResolutionManagement {
repositories {
Expand Down Expand Up @@ -49,3 +52,9 @@ include(":modules:openapi")
include(":modules:persistence")
include(":modules:services")
include("modules:local-kms")
include("modules:logging")
findProject(":modules:logging")?.name = "logging"
include("modules:logging")
findProject(":modules:logging")?.name = "logging"
include("modules:logging")
findProject(":modules:logging")?.name = "logging"

0 comments on commit 8dbb3e5

Please sign in to comment.