summaryrefslogtreecommitdiff
path: root/qpid/doc/book/src/java-broker/Java-Broker-Runtime-Log-Files.xml
blob: 1fde82656d57983212c2b772d1316eed4438cf41 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="utf-8"?>
<!--

 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.

-->

<section id="Java-Broker-Runtime-Log-Files">
 <title>Log Files</title>
 <para> The Broker uses the <ulink url="http://logging.apache.org/log4j/1.2/">Apache Log4J</ulink>
  Logging Framework for all logging activity. </para>
 <para> In the Broker's shipped configuration, all logging is directed to log file <literal><link
    linkend="Java-Broker-Appendix-Environment-Variables-Qpid-Work"
   >${QPID_WORK}</link>/log/qpid.log</literal>. The log file is not rotated and will be overwritten
  when the Broker restarts. Logging levels are configured in such a way that the log will comprise
  of:</para>
 <itemizedlist>
  <listitem>
   <para>Opertional Log Events. These report key events in the lifecycle of objects (Broker
    start-up, Queue creation, Queue deletion etc) within the Broker. See <xref
     linkend="Java-Broker-Appendix-Operation-Logging"/> for details of the formation of these
    messages.</para>
  </listitem>
  <listitem>
   <para>Queue Alert Events. These report when the queue thresholds have been breached. See <xref
    linkend="Java-Broker-Appendix-Queue-Alerts"/> for details.</para>
  </listitem>
  <listitem>
   <para>Any Error and Warning conditions.</para>
  </listitem>
 </itemizedlist>
 <para>Logging can be reconfigured either by changing the logging configuration file <literal><link
    linkend="Java-Broker-Appendix-Environment-Variables-Qpid-Home"
   >${QPID_HOME}</link>/etc/log4j.xml</literal> or at runtime using the Logging Management MBean,
  see <xref linkend="Java-Broker-Management-Channel-JMX-MBeans"/> for
  details.</para>
 <section id="Java-Broker-Runtime-Log-Files-Enable-Debug">
  <title>Enabling Debug</title>
  <para>It can be helpful to enable debug within the Broker in order to understand a problem more
   clearly. If this is required, debug can be enabled at runtime (without restarting the Broker)
   using the Logging Management MBean. The change can also be made by changing the log configuration
   file and restarting the Broker. Whichever mechanism is chosen, change the appender associated
   with <literal>org.apache.qpid</literal> from <literal>WARN</literal> to
   <literal>DEBUG</literal>.</para>
  <example>
   <title>Changing the log4j.xml configuration file to enable debug</title>
   <screen><![CDATA[
...
<logger additivity="true" name="org.apache.qpid">
    <level value="debug"/> <!-- change the level value from warn to debug -->
</logger>
...]]></screen>
  </example>
  <important>
   <para>Running a production system at <literal>DEBUG</literal> level can have performance
    implications by slowing the Broker down. It can also generate large log files. Take care to
    revert the logging level back to <literal>WARN</literal> after the analysis is performed.</para>
  </important>
 </section>
</section>