-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathINSTALLATION.txt
executable file
·65 lines (42 loc) · 1.89 KB
/
INSTALLATION.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Given that this project's goal is to illustrate logging separation in
presence of shared libraries located on a shared class path, the
following artifacts must be placed in the common class path of your
web-server.
Assuming your web-server is Tomcat 6, place following files
shared-1.0.jar // the shared library built by this project
slf4j-api-1.5.11.jar
logback-core-0.9.19.jar
logback-classic-0.9.19.jar
under $TOMCAT6_HOME/lib.
The shared-1.0.jar artifact can be obtained by building this project,
that is by launching the 'mvn package' command.
To add yoda and kebobi to your web-app, add the following to your
Tomcat server's conf/server.xml file under the appropriate <host>:
<Context docBase="some_path../logback-starwars/kenobi/target/kenobi"
path="/kenobi"/>
<Context docBase="some_path.../logback-starwars/yoda/target/yoda"
path="/yoda"/>
where "some_path..." the folder containing the logback-starwars
project.
Enabling ContextJNDISelector
============================
To enable ContextJNDISelector you need to add
JAVA_OPTS="$JAVA_OPTS -Dlogback.ContextSelector=JNDI"
to Tomcat's catalina.sh script.
Location of logback.xml
=======================
By default, if a context is named foobar, ContextJNDISelector will
configure the the logging context for fooback from a file named
logback-foobar.xml. To keep things simple, we assume you override this
convention so that all context will use the same configuration
file. Here the snippet you should place in each web-applications
web/xml file:
<env-entry>
<env-entry-name>logback/configuration-resource</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>logback.xml</env-entry-value>
</env-entry>
The logback.xml file should then be placed under $TOMCAT6_HOME/lib.
Questions?
==========
Please address your questions to the [email protected] mailing list.