Commit | Line | Data |
---|---|---|
215610eb PP |
1 | --- |
2 | id: java-application | |
86384750 | 3 | since: 2.4 |
215610eb PP |
4 | --- |
5 | ||
6 | LTTng-UST provides a _logging_ back-end for Java applications using | |
7 | either | |
8 | <a href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html" class="ext"><code>java.util.logging</code></a> | |
9 | (JUL) or | |
10 | <a href="http://logging.apache.org/log4j/1.2/" class="ext">Apache log4j 1.2</a>. | |
11 | This back-end is called the _LTTng-UST Java agent_, and it is responsible | |
12 | for the communications with an LTTng session daemon. | |
13 | ||
14 | From the user's point of view, once the LTTng-UST Java agent has been | |
15 | initialized, JUL and log4j loggers may be created and used as usual. | |
16 | The agent adds its own handler to the _root logger_, so that all | |
17 | loggers may generate LTTng events with no effort. | |
18 | ||
19 | Common JUL/log4j features are supported using the `lttng` tool | |
20 | (see [Controlling tracing](#doc-controlling-tracing)): | |
21 | ||
22 | * listing all logger names | |
23 | * enabling/disabling events per logger name | |
24 | * JUL/log4j log levels |