Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

klogging/klogging-spring-boot-starter

Repository files navigation

Spring Boot starter for Klogging

The code for this library is now here and this repository is archived

See Klogging documentation for more details.

Set up Gradle:

dependencies {
    implementation("org.springframework.boot:spring-boot-starter") {
        exclude(group = "ch.qos.logback")
    }
    implementation("io.klogging:klogging-spring-boot-starter:0.5.0")
    // Other runtime dependencies.
    
    testImplementation("org.springframework.boot:spring-boot-starter-test") {
        exclude(group = "ch.qos.logback")
    }
    // Other test dependencies.
}

Configure Klogging

Put a klogging.json file in the src/main/resources directory of the project.

Here is a simple one for logging to the console.

{
  "sinks": {
    "stdout": {
      "renderWith": "RENDER_ANSI",
      "sendTo": "STDOUT"
    }
  },
  "logging": [
    {
      "levelRanges": [
        {
          "fromMinLevel": "INFO",
          "toSinks": [
            "stdout"
          ]
        }
      ]
    }
  ]
}

About

Spring Boot starter to use Klogging for logging

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages