Table of Contents

Toggle Debug Logging

Generally, you do not want debug logging enabled. Debug logging stores lots of detailed information about LSWS'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.

Setup

Toggle Debug Logging switches your Debug Level setting from NONE to HIGH. Thus, in order to use Toggle Debug Logging, your Log Level must be set to DEBUG and your Debug Level set to NONE, as shown below. (These settings are in the WebAdmin console > Configuration > Server > Log.)

Send Signal SIGUSR2 to Toggle Debug Logging From Command Line

Back up or delete old error_log:

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 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 turn it off after getting necessary debug log.

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

Use Toggle Debug Logging From WebAdmin Console

With the base settings ready, Toggle Debug Logging is really easy to use. (That is the point, after all.) Just go to the Actions menu and select Toggle Debug Logging.

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

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

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

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