Repository: james-project Updated Branches: refs/heads/master 2248c18cd -> 188b6d19b
JAMES-1846 Documenting how to get access to log file Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/29d1812d Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/29d1812d Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/29d1812d Branch: refs/heads/master Commit: 29d1812db1a508e83727563f26b02ccfb4696101 Parents: 8bba513 Author: Benoit Tellier <btell...@linagora.com> Authored: Fri Oct 21 16:27:20 2016 +0200 Committer: Benoit Tellier <btell...@linagora.com> Committed: Mon Oct 24 09:57:53 2016 +0200 ---------------------------------------------------------------------- README.adoc | 2 ++ dockerfiles/run/guice/Dockerfile | 2 ++ dockerfiles/run/guice/destination/conf/logback.xml | 9 +++++++++ 3 files changed, 13 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/29d1812d/README.adoc ---------------------------------------------------------------------- diff --git a/README.adoc b/README.adoc index d9939a8..ad91585 100644 --- a/README.adoc +++ b/README.adoc @@ -178,6 +178,8 @@ Where : You can add an optional port binding to port 8000, to expose the webadmin server. Please note that users are not authenticated on webadmin server, thus you should avoid exposing it in production. +To have log file accessible on a volume, add *-v $PWD/logs:/logs* option to the above command line, where *$PWD/logs* is your local directory to put files in. + Run James with Java 6 + Spring + JPA ==================================== http://git-wip-us.apache.org/repos/asf/james-project/blob/29d1812d/dockerfiles/run/guice/Dockerfile ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/Dockerfile b/dockerfiles/run/guice/Dockerfile index 03f2a0c..229dd1b 100644 --- a/dockerfiles/run/guice/Dockerfile +++ b/dockerfiles/run/guice/Dockerfile @@ -25,4 +25,6 @@ ADD destination/james-server-cli-3.0.0-beta5-SNAPSHOT.jar /root/james-cli.jar ADD destination/james-server-cli-3.0.0-beta5-SNAPSHOT.lib /root/james-server-cli-3.0.0-beta5-SNAPSHOT.lib ADD destination/conf /root/conf +VOLUME /logs + ENTRYPOINT java -Dlogback.configurationFile=/root/conf/logback.xml -Dworking.directory=/root/ -jar james-server.jar http://git-wip-us.apache.org/repos/asf/james-project/blob/29d1812d/dockerfiles/run/guice/destination/conf/logback.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/destination/conf/logback.xml b/dockerfiles/run/guice/destination/conf/logback.xml index f2c08d8..7685591 100644 --- a/dockerfiles/run/guice/destination/conf/logback.xml +++ b/dockerfiles/run/guice/destination/conf/logback.xml @@ -12,8 +12,17 @@ </encoder> </appender> + <appender name="LOG_FILE" class="ch.qos.logback.core.FileAppender"> + <file>/logs/james.log</file> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern> + <immediateFlush>false</immediateFlush> + </encoder> + </appender> + <root level="INFO"> <appender-ref ref="CONSOLE" /> + <appender-ref ref="LOG_FILE" /> </root> </configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org