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.
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. 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 installationlog4j.rootCategory=DEBUG, stdout, file, admin
Logging for normal operationlog4j.rootCategory=INFO, stdout, file, admin
For Weave running as a service output to log file and Admin Tool onlylog4j.rootCategory=INFO, file, admin
- 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. 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# 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# 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
).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.
Learn to love your log files!
Related articles