Applicable to:
- Plesk 11.x for Linux
- Plesk 12.0 for Linux
- Plesk 12.5 for Linux
- Plesk Onyx for Linux
Symptoms
How to enable debug mode in Plesk Onyx and earlier versions for Linux?
Resolution
It's possible to enable/disable debug logging in Plesk GUI and directly on the server.
In Plesk GUI:
- Install the "Panel.ini Editor" extension in Plesk: Plesk > Extensions > view all (under Server Tools group) > Panel.ini Editor > Install.
- Go to Plesk > Extensions > My Extensions > Panel.ini Editor > Go To Extension > Editor.
Check point 3 of "Directly on the server" what should be uncommitted to enable debug logging.
Directly on the server:
- Connect to the server using SSH .
-
Copy sample configuration file
/usr/local/psa/admin/conf/panel.ini.sample
to/usr/local/psa/admin/conf/panel.ini:
# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
-
To enable debug logging, uncomment (remove a semicolon ";" in the beginning of the string) the following lines in
panel.ini
:CONFIG_TEXT: [debug]
; Enable debug mode (do not use in production environment)
enabled = on
[log]
; Log messages verbosity level (from 0 to 7)
; 0 - only critical errors, 7 - all including debug messages, default - 3
filter.priority = 7
; Enable logging of SQL queries
show.sql_query = on
; Enable logging of external utilities calls
show.util_exec = on -
To disable debug mode, comment out the above lines in
panel.ini
. -
Log with enabled debug mode can be found in the file
/usr/local/psa/admin/logs/panel.log
.
Example of output when debug mode is enabled:
# /usr/local/psa/bin/ip_ban --update -ban_period 600 -ban_time_window 600 -max_retries 10
DEBUG [dbquery] [0] SQL: SET sql_mode = ''
DEBUG [dbquery] [0] END: 0.00023102760314941 sec
DEBUG [dbquery] [1] SQL: SET NAMES utf8
DEBUG [dbquery] [1] END: 0.00013208389282227 sec
DEBUG [dbquery] [2] SQL: connect
DEBUG [dbquery] [2] END: 0.00038313865661621 sec
DEBUG [dbquery] [3] SQL: SET sql_mode = ''
DEBUG [dbquery] [3] END: 0.00014400482177734 sec
...
SUCCESS: The settings were updated.
Example of output when debug mode is disabled:
# /usr/local/psa/bin/ip_ban --update -ban_period 600 -ban_time_window 600 -max_retries 10
SUCCESS: The settings were updated.
Note: Changes take effect immediately (e.g. there is no need for
service psa restart
or other such commands), because small binaries like
ip_ban
read those settings each time they are started.
Certain sources of debug entries can be managed by the following directives:
CONFIG_TEXT: ; Enable logging of SQL queries
show.sql_query = on
; Enable logging of external utilities calls
show.util_exec = on
; Enable logging of stdin and stdout for external utilities calls (do not use in production environment)
show.util_exec_io = on
; Enable logging of APSC activities
apsc.enabled = on
Comments
0 comments
Please sign in to leave a comment.