Query monitor
Use the Query monitor plugin to check:
- errors
- load times
- cache status
- crazy queries
For logging you can also use its debugging and profiling features: Profiling and Logging in Query Monitor:
Logging
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
do_action( 'qm/debug', 'This happened!' );
// qm/emergency
// qm/alert
// qm/critical
// qm/error
// qm/warning
// qm/notice
// qm/info
// qm/debug
// Instead of actions one might also use static methods:
QM::error( 'Everything is broken' );
// Other log levels also available
|
Profiling
1
2
3
4
5
6
7
8
9
|
do_action( 'qm/start', 'foo' );
// Run code
slow_call();
// Time laps if necessary
do_action( 'qm/lap', 'foo' );
do_action( 'qm/stop', 'foo' );
|