How to enable debugging mode

How to enable debugging mode on logs

Details:

During this process, the Pureweb Customer Care team requires the following:
  1. Ensure the server date/time is set correctly.
  2. Enable debugging for the pureweb.log file.
  3. Reproduce the issue and write down the time of the issue.
  4. Send the following to Pureweb
    • The date and time of the issue.
    • Steps used to reproduce the issue.
    • The pureweb.log file with debug enabled.
1.1. Limit the size of the log file

To help narrow down the issue and to have a smaller log trace, in Linux you can tail the output of the pureweb.log file to a new file, test-pureweb.log.
  1. Connect the server as an administrator.
  2. Go to /opt/CSI/PureWeb/Server/tomcat/logs.
  3. Tail the output of the log: tail -f pureweb.log > test-pureweb.log
  4. Hit Ctrl+C to finish.
Additionally, in some cases, it is beneficial to see if there are any errors during service startup, so after tailing the log you have to restart the PureWeb® service.

1.2. Edit the logback.properties file to change the layout of the log message
  1. Go to /opt/CSI/PureWeb/Server/tomcat/custom/classes.
  2. Edit the logback.properties file:
Change the following line:
Log message layout change
- layout=%d{ISO8601} %-5level %5X{PID} %logger{0} %msg%n

+ layout=%d{ISO8601} %thread %-5level %5X{PID} %logger{0} %msg%n

This change will allow the support team to match a DICOM PDU message to its Association-RQ to tell apart DICOM threads.


1.3. Edit the logback.xml file to change the debugging level

To enable debugging, you must modify the logback.xml file. There are 2 methods to access the logback.xml file:
To access the logback.xml file using the Server web interface:
  1. Log into the server web interface as the administrator.
  2. Select Settings ▸ Advanced.
  3. Scroll down to the logback.xml file and edit it.
  4. Save the file and go to the top of the page and click Reload Logging.
To access the logback.xml file using the Server Offline Configuration:
  1. Connect the server as an administrator.
  2. Go to /opt/CSI/PureWeb/Server/tomcat/custom/classes
  3. Edit the logback.xml file.
1.4. Enabling URL Access/Debugging

In the logback.xml file, locate the following text and change INFO to DEBUG.
<logger name="pureweb.servlet.RequestLoggingFilter" level="INFO">
<appender-ref ref="access"/>
</logger>

 

1.5. Enabling LDAP Debugging


In the logback.xml file, add the following text under the pureweb.servlet.RequestLoggingFilterparameter.
<logger name="org.springframework.security" level="DEBUG"/>
To enable debugging of the mandated access add the following line:
<logger name="pureweb.dicom.mandatedaccess.DroolsRuleManager" level="DEBUG"/>

1.6. Enabling DICOM Debugging

In the logback.xml file, locate the following text and change INFO and WARN to DEBUG.
<logger name="org.dcm4che2" level="WARN"/>
<logger name="org.dcm4che2.net.Association" level="INFO"/>

 

1.7. Restarting Services

There are 2 options available to restart services.
To restart services using the server web interface:
  1. Log into the server web interface as the administrator.
  2. Select Settings ▸ Advanced.
  3. Scroll down and click Reload Logging.
  4. Logout and login again to refresh the web interface.
To restart services using the Server Offline Configuration
  Restart the services using the following command: service pureweb restart
Source: SF KB