Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 has been changed from log4j to Logback so while this page may refer to log4j (instead of logback) and logging.propertties (instead of logging.xml) the information is still relevant (and has been extended to reflect the changes)

Step-by-step guide

  1. In most cases the first step in resolving issues with Weave involves looking at the weave.log file (in the ...\weave\logs

    folder

    \ folder) and searching for any ERROR or WARN 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.

    1. This is assuming that logging to weave.log is enabled, which it was by default prior to Weave 2.6.7, as of Weave 2.6.7 by default weave.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 can be changed by editing the logging.xml file.

    2. As of Weave 2.6.7 detailed log information is always available via the Admin UI log tool and also via the "dump logs" osgi console command, independent of the weave.log file

  2. 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). 

    Code Blocktitle

    Logging for problem debugging and installation

    title
    Code Block
    log4j.rootCategory=DEBUG, stdout, file, admin
    Code Block

    Logging for normal operation

    title
    Code Block
    log4j.rootCategory=INFO, stdout, file, admin
    Code Block

    For Weave running as a service output to log file and Admin Tool only

    Code Block
    log4j.rootCategory=INFO, file, admin
    1. For Weave 2.6.7and 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.

  3. 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 to DEBUG (this includes both the log4j.rootCategory and log4j.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 the weave.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 the DEBUG log level is important, and can be done without having to restart Weave.

    1. This still applies for Weave 2.6.7 and later, it's just the changes are made to logging.xml, not logging.properties

  4. 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. 

  5. 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.

    Code Blocktitle

    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.

    Code Blocktitle

    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).

    1. This is no longer the default in 2.6.7 and later, the full date and time of the log event is records in the log file

  6. 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.

  7. 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 the F12 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!

...

Filter by label (Content by label)
sort
showLabelsfalse
max5
spacescohga
sortmodified
showSpacefalse
modifiedreversetrue
typepage
cqllabel in ( "logfile" , "error" , "testing" , "logging" ) and type = "page" and space = "weavedocs1"
labelslogfile error
Page Properties
hiddentrue


Related issues

...