Toggle Debug Logging

When all is going well, you generally do not want debug logging enabled. Debug logging stores lots of detailed information about LiteSpeed Web Server's processes. This information is usually unnecessary and fills up disk space very quickly. For this reason, we advise that you set your Debug Level setting to NONE. If, however, you are having a problem that requires more information, LiteSpeed's Toggle Debug Logging feature will allow you to quickly turn on debug logging while you reproduce the issue and then turn it off just as quickly so that your service is not affected. This wiki will guide you through setting up and using the Toggle Debug Logging feature.

Toggle Debug Logging From the Command Line

You can send the SIGUSR2 signal to toggle debug logging from the command line.

Back up or delete the old error_log file if it exists:

mv error_log error_log.old

Toggle LiteSpeed server debug log (run once to turn on, run again to turn off):

killall -USR2 litespeed

Reproduce the problematic issue in your browser.

Toggle the debug log off:

killall -USR2 litespeed

Move the debug log to error_log.debug:

mv error_log error_log.debug

The error_log.debug file could be very big if it is a busy production server. Please make sure to toggle logging off once you've gotten the necessary information.

If you need to forward the log to our support department, please gzip it first.

Toggle Debug Logging From the WebAdmin Console

With the base settings ready, Toggle Debug Logging is really easy to use. Navigate to the Actions menu and select Toggle Debug Logging.

!Toggle Debug Logging

You will get a confirmation message making sure you want to toggle debug logging. Select OK.

!Confirm Debug Logging

When you look at your log now, make sure you have Display Level set to DEBUG.

!Debug Display Level

You should be getting all sorts of new, dark blue debug information.

!Debug Data

To toggle debug logging off again, just go back to the Actions menu and select Toggle Debug Logging again.


Last update: April 27, 2020