Skip to content

Instantly share code, notes, and snippets.

@BooookStore
Created January 2, 2020 06:39
Show Gist options
  • Save BooookStore/3691dedb2abbafb69a98d505096f4f2e to your computer and use it in GitHub Desktop.
Save BooookStore/3691dedb2abbafb69a98d505096f4f2e to your computer and use it in GitHub Desktop.
Hello World SLF4J
plugins {
java
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("org.slf4j", "slf4j-api", "1.7.30")
implementation("org.slf4j", "slf4j-simple", "1.7.30")
testImplementation("junit", "junit", "4.12")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
package com.example.slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GettingStartedSLF4J {
public static void main(String[] args) {
Logger logger = LoggerFactory.getLogger(GettingStartedSLF4J.class);
logger.info("Hello, SLF4J!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment