JAL-3676 adding Axis and Castor loggging properties to the help text
[jalview.git] / help / help / html / logging.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *  
13  * Jalview is distributed in the hope that it will be useful, but 
14  * WITHOUT ANY WARRANTY; without even the implied warranty 
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
16  * PURPOSE.  See the GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
20  * The Jalview Authors are detailed in the 'AUTHORS' file.
21  -->
22 <head>
23 <title>The Java Console, Logging and Reporting Bugs</title>
24 </head>
25 <body>
26   <h2>
27     <center>
28       <strong>The Java Console, Logging and Reporting Bugs</strong>
29     </center>
30   </h2>
31   
32   <h3>Logging</h3>
33   <p>
34   Jalview creates logs that can be extremely useful for diagnosing, or help to provide a workaround for, specific problems that you might encounter.
35   </p>
36   <p>
37   The primary place to look for logs is in the <a href="#java_console">Java Console</a> which you can open from within Jalview by going to the <em>Tools</em> menu and checking the box next to <em>Show Java Console</em>.  This option is stored in your Jalview preferences file and so is remembered across Jalview sessions.
38   </p>
39   <p>
40   The Java Console will show you information about what the Jalview application is doing (often in the background) whilst it is running.
41   </p>
42   <p>
43   However, it is possible that some early logging information from when Jalview is initially launched, is not shown in the Java Console:
44   <br/>
45   If you are using a standard desktop version of Jalview installed from one of our install4j installers, then Jalview's initial launch logging can be found in
46   <pre>JALVIEW_APP_DIR/launcher.log</pre>
47   where <em>JALVIEW_APP_DIR</em> is the directory that Jalview's application was installed into.
48   <br/>
49   For Jalview 2.11.0 onwards:
50   <ul>
51     <li>In Windows this is <em>%APPDATA%\Local\Jalview</em> by default</li>
52     <li>In macOS this is <em>/Applications/Jalview.app/Contents/Resources/app</em> by default</li>
53     <li>In Linux and other Unix OSes this is <em>~/opt/jalview</em> by default</li>
54   </ul>
55   <br/>
56   Whereas if you are using the Jalview executable jar file (also used by bioconda installations) then the default run class (<em>jalview.bin.Launcher</em> -- a minimised launcher that will set memory and linux dpi settings before re-launching <em>jalview.bin.Jalview</em>), will output logging information to STDOUT and STDERR.
57   </p>
58   
59   <h3><a name="java_console">Java Console and Log Level</a></h3>
60   <p>
61   The Java Console is opened by selecting <strong>Tools &rarr; Show Java Console</strong>.  This option is saved across Jalview sessions so you can start Jalview with the Java Console already open by previously quitting Jalview with the Java Console already opened.  Selecting <em>Show Java Console</em> in the <em>Tools</em> menu a second time will deselect the option and close the window.  Closing the window in your system's usual way will also deselect the option in the <em>Tools</em> menu.
62   </p>
63   <p>
64   The Java Console's text display always shows information about your system and Jalview installation setup, which is followed by messages output from some of the processes that your Jalview session has performed since opening the console.
65   </p>
66   <p>
67   You can control the detail of what appears as output by selecting a <em>Log level</em> using the drop-down list at the bottom left of the console.  There are several levels of logging that you can choose from: in decreasing levels of verbosity they are: TRACE, DEBUG, INFO, WARN.  By default the level initially chosen is INFO.
68   </p>
69   <p>
70   <strong>Note! If you change the log level in the Java Console, this change will only persist for as long as the console is open.  Once you close the console the log level will revert back to what it had been when you opened the console (usually INFO).</strong>
71   </p>
72   <p>
73   You can change the default log level by editing the Jalview preferenecs file, <em>.jalview_properties</em>, found in your home directory (on Windows: %HOMEPATH%, or the folder above 'My Documents'; on macOS: ~ or /Users/<em>username</em>; on linux/unix: ~ or /home/<em>username</em>), and setting the property <em>logs.Jalview.level</em> to the log level you prefer, e.g.
74   <pre>
75   logs.Jalview.level=DEBUG
76   </pre>
77   You can also set the property
78   <pre>
79   logs.Axis.level=DEBUG
80   </pre>
81   to get debug information for the SOAP services, and
82   <pre>
83   logs.Castor.level=DEBUG
84   </pre>
85   to get excessive information on XML serialisation and deserialisation!  These last two properties cannot be set from within the Java Console.
86   </p>
87   <p>
88   You can set the <em>logs.jalview.level</em> property to a log level not usually presented in the Java Console (though restricted to log levels used by Apache Log4j -- see <a href="https://logging.apache.org/log4j/2.x/manual/customloglevels.html">Log4j Custom Log Levels</a> for details of the standard log levels available).  Jalview does not currently define any custom log levels.  If you do set the property with a log level that is normally not visible in the Java Console this should be respected and visibly selected when you open the console.
89   </p>
90   <p>
91   The <em>Clear</em> button at the bottom of the console will clear all logging messages except for the initial system information which is rewritten to the console.
92   </p>
93   <p>
94   The <em>Copy to clipboard</em> button at the bottom right of the console will copy all of the text in the console to your system clipboard, ready to paste into another application (e.g. email composer or issue tracker).
95   </p>
96
97   <h3>Reporting Bugs</h3>
98
99   <p>
100   If you come across a problem in Jalview where something is not working as described, or how you think it should, you should first check the <a href="https://www.jalview.org/faq">Jalview FAQ</a> to see if this is a known problem and if there is a suggested workaround.
101   </p>
102   <p>
103   If there is no FAQ answer covering your problem then you can submit a bug report on the <a href="https://issues.jalview.org/">Jalview Issue Tracker</a>.  It is good practice to search the issue tracker first to see if the issue has already been reported.  If an issue already exists please continue to add your own comments to the issue which may well help narrow down the problem, if not then you can create an account and submit a new bug report: 
104   </p>
105   <p>
106   Make sure that you set Project to <em>Jalview (JAL)</em>, and Issue Type to <em>Bug</em> or <em>New Feature</em> or <em>Improvement</em> appropriately.<br/>
107   Give a one line summary of the issue in the <em>Summary</em>.
108   <br/>
109   In the <em>Environment</em> text box you can describe the system you are using.  This is usually most easily done by opening the Java Console, clicking the <em>Clear</em> button, and then immediately on the <em>Copy to clipboard</em> button, and then pasting the clipboard into the text box.
110   </p>
111   <p>
112   You can then give more detailed information about how to recreate the problem in the <em>Description</em> text box.  If you want to attach any screenshots or example alignment files that demonstrate the problem then you can drag them to the Create Issue dialog in your browser, or use the <em>Attachment</em> browse facility to locate them on your computer.
113   </p>
114
115   <p>
116   To help the Jalview team with diagnosing a particular issue, it is really helpful if you can also add more detailed logs output whilst re-creating the problem.  To do this, open the Java Console, click the <em>Clear</em> button and select TRACE in the <em>Log level</em> drop down list.
117   <br/>
118   Whilst leaving the console open, perform the task in Jalview that re-creates the problem.
119   <br/>
120   Then you can copy the debug information in the Java Console by clicking on the <em>Copy to clipboard</em> button and then paste that into the Description, or a Comment of your issue.
121   </p>
122
123   <p>For other queries or comments about Jalview, remember you can contact the Jalview team using email via the <a href="https://www.jalview.org/mailman/listinfo/jalview-discuss">Jalview discussion list</a> or on Twitter <a href="https://twitter.com/Jalview/">@Jalview</a>!
124   </p>
125
126 </body>
127 </html>