Created
January 2, 2020 06:39
-
-
Save BooookStore/3691dedb2abbafb69a98d505096f4f2e to your computer and use it in GitHub Desktop.
Hello World SLF4J
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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