Weave logs can give you a lot of information to help you deal with problems if they arise in your Weave installation. Here are a few pointers that can help you get the most out of your Weave logging.
Warning |
---|
As of Weave 2.6.7, the logging system for Weave has been changed from log4j to Logback so . So while this page may refer to log4j (instead of logbackLogback) and |
Step-by-step guide
In most cases the first step in resolving issues with Weave involves looking at the
weave.log
file (in the ...\weave\logs\
folder) and searching for anyERROR
orWARN
messages that may be related to the problem being experienced. This file keeps a running log of what Weave is doing at any moment, and by triggering the action that's causing the problem and then looking at the last few lines that were written to the log file, it may be possible to determine the cause of the problem.This is assuming that logging to
weave.log
is enabled, which it was by default prior to Weave 2.6.7, as . As of Weave 2.6.7, by defaultweave.log
output is only generated when Weave is run from a service/daemon, if it is not then the output you're looking for will be sent to the console window, but the . But this can be changed by editing the defaultlogging.xml
file.As of Weave 2.6.7, detailed log information is always available via the Log Tool in the Admin UI log tool Tool and also via the "dump logs" osgi OSGi console command, independent of the
weave.log
file.
If you have administration access to the Weave server then you can change the logging level yourself. This is done by changing a parameter in the
logging.properties
files (in the ..\weave\platform\workspace
folder) to one of the settings as shown below. Enabling the DEBUG log level is important when trying to identify the cause of a problem, and can be done on a running system without having to restart Weave (though you have wait for up to 30 seconds for the change to be registered).Logging for problem debugging and installation
Code Block language xml log4j.rootCategory=DEBUG, stdout, file, admin
Logging for normal operation
Code Block language xml log4j.rootCategory=INFO, stdout, file, admin
For Weave running as a service output to log file and Admin Tool only
Code Block language xml log4j.rootCategory=INFO, file, admin
For Weave 2.6.7and 7 and later, this is done in
logging.xml
and the root log level is always set to debug so you must set the log level within each appended to change the level. The root category tag lists the logging appenders that are used to generate the different types of log output and by default use configuration options to try and determine the best type of log output depending upon where Weave is running, e.g. from the console, as a service, within an IDE. But this can be changed to remove the conditions and allow you to directly choose which types of log output your require.
If your initial investigation of the
weave.log
file doesn't reveal anything then the following method should be followed:
1. Ensure that the logging level in the ...\weave\platform\workspace\logging.properties
file is set toDEBUG
(this includes both thelog4j.rootCategory
andlog4j.appender.file
.Threshold
settings).
2. Stop Weave.
3. Delete...\weave\logs\weave.log
.
4. Start Weave.
5. Perform the action that causes the problem.
6. Log a Support Ticket and include theweave.log
file to us (after compressing it if it's large).
This method asks for Weave to be stopped and the log file cleaned out so that we can ensure that the log file covers as little as possible other than what is related to the problem since log files can grow quite large. If the problem is being experienced on a production system then it's not essential that the log file be cleaned out since Weave cannot be stopped. But, enabling theDEBUG
log level is important, and can be done without having to restart Weave.This still applies for Weave 2.6.7 and later, it's just the changes are made to
logging.xml
, notlogging.properties
Use the Log Tool in the Weave Administration Tool to view the debug, information, warning and error statements from your Weave while it's in operation.
By default the Weave log file will not contain the date of the entry written in the log file, just the time, as there is a new log file created every day. However if you need the date of the log entry recorded in your log file then you can make this change in the
logging.properties
files (in the ..\weave\platform\workspace
folder) as shown below.Default log file parameters
Code Block # Define a logger that sends it's output to a rolling log file log4j.appender.file=org.apache.log4j.DailyRollingFileAppender log4j.appender.file.Threshold=DEBUG log4j.appender.file.File=../logs/weave.log log4j.appender.file.Encoding=UTF-8 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%t] %x %c "%m"%n
Change the
ConversionPattern
setting (in the last line) as shown below.Log file with date for each entry
Code Block # Define a logger that sends it's output to a rolling log file log4j.appender.file=org.apache.log4j.DailyRollingFileAppender log4j.appender.file.Threshold=DEBUG log4j.appender.file.File=../logs/weave.log log4j.appender.file.Encoding=UTF-8 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d %-5p [%t] %x %c "%m"%n
The same change can be applied to other logging methods you have defined in your
logging.properties
file (e.g.log4j.appender.stdout, log4j.appender.email
).This is no longer the default in Weave 2.6.7 and later, the full date and time of the log event is records recorded in the log file.
If you are running a search and it's not giving you the results you are expecting then it's good to see the actual SQL command that is being sent to the database. Search for "NativeSQL" in your log file, copy the SQL statement, and run it in your database query software or in the Data Source SQL tool in the Weave Administration Tool.
If you are having problems on the Weave client side (browser) you can get more information returned from the browser. To do this add ";debug" to the startup URL (e.g.
http://server1:8080/weave/main.html;debug
). Pressing theF12
key, in Internet Explorer, once Weave is open, will open up the browser console and display any client side errors. Restarting Weave with the normal URL will return it to the standard way of operating.
Info |
---|
Learn to love your log files! |
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page Properties | ||
---|---|---|
| ||
|
...