Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jsonSimpleVersion = 1.1.1
logbackVersion = 1.2.3
slf4jVersion = 1.7.30
httpClientVersion = 4.5.14
log4jVersion = 2.20.0

# Style Packages
findbugsAnnotationVersion = 3.0.1
Expand Down
14 changes: 8 additions & 6 deletions java-quickstart/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apply plugin: 'java'

dependencies {
compile project(':core-api')
compile project(':core-httpclient-impl')
implementation project(':core-api')
implementation project(':core-httpclient-impl')

compile group: 'com.google.code.gson', name: 'gson', version: gsonVersion
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: httpClientVersion
compile group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
implementation group: 'com.google.code.gson', name: 'gson', version: gsonVersion
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: httpClientVersion
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4jVersion
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4jVersion
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: log4jVersion

testCompile group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'junit', name: 'junit', version: junitVersion
}

task runExample(type: JavaExec) {
Expand Down
10 changes: 10 additions & 0 deletions java-quickstart/src/main/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set the root logger level to INFO and its appender to the console

appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n

# Specify the loggers
rootLogger.level = debug
rootLogger.appenderRef.stdout.ref = STDOUT