Skip to content

Commit

Permalink
Merge pull request #87 from melissalinkert/logback-config
Browse files Browse the repository at this point in the history
Remove logback.xml from raw2ometiff jar
  • Loading branch information
chris-allan authored Dec 5, 2022
2 parents 82b9536 + 8577c38 commit 4e7dbf9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,25 @@ Development Installation

./gradlew tasks

Configuring Logging
===================

Logging is provided using the logback library. The `logback.xml` file in `src/dist/lib/config/` provides a default configuration for the command line tool.
In release and snapshot artifacts, `logback.xml` is in `lib/config/`.
You can configure logging by editing the provided `logback.xml` or by specifying the path to a different file::

JAVA_OPTS="-Dlogback.configurationFile=/path/to/external/logback.xml" \
bioformats2raw ...

Eclipse Configuration
=====================

1. Run the Gradle Eclipse task:

./gradlew eclipse

2. Add the logback configuration in `src/dist/lib/config/` to your CLASSPATH.

Usage
=====

Expand Down
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ distributions {
}
}

startScripts {
// placing logback.xml somewhere under src/dist/lib/ keeps it out of
// raw2ometiff-*.jar but automatically includes it in the distribution zip
// the directory containing logback.xml must be explicitly added to the
// startup scripts' classpath, otherwise it will not be detected

// a subdirectory of 'src/dist/lib/' (not just 'src/dist/') is necessary,
// likely due to https://issues.gradle.org/browse/GRADLE-2991
// see also discussion in https://github.com/glencoesoftware/bioformats2raw/pull/169
classpath += files('src/dist/lib/config/')
}

publishing {
publications {
raw2ometiff(MavenPublication) {
Expand Down
File renamed without changes.

0 comments on commit 4e7dbf9

Please sign in to comment.