slf4j and logback


Dependency Scopes

<dependency>
  <groupId>ch.qos.logback</groupId>
  <artifactId>logback-classic</artifactId>
  <scope>test</scope> <!-- or runtime -->
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-api</artifactId>
  <scope>compile</scope>
</dependency>
dependencies {
    compile 'org.slf4j:slf4j-api:...'
    testRuntime 'ch.qos.logback:loback-classic:...'
}

Prject Hierarchies

/
/build.gradle
/src/
/src/main/
/src/main/resources
/src/test/
/src/test/resources/
/src/test/resources/logback-test.xml // local tests only
/
/pom.xml
/src/
/src/main/
/src/main/resources/
/src/main/resources/logback.xml // if this is module is a stand-alone program
/src/test/
/src/test/resources/logback-test.xml // if this module is going to run on a server
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s