'

MKP Base Create Diagnostics

You can easily write a message to the log file using a shortcode:

mkp_base message=’Sample diagnostic message’ log

By adding the show_diagnostics action you can see what is in the log.

mkp_base message=’Sample diagnostic message’ log show_diagnostics

You can specify the prefix that precedes each message using the source=’your prefix’:

mkp_base message=’Sample diagnostic message’ source=’DEMO: ‘ log show_diagnostics

It is a good idea to clear the log frequently:

mkp_base clear_diagnostics

All of these actions can be combined in a single shortcode:

mkp_base clear_diagnostics
mkp_base message=’Sample diagnostic message’ source=’DEMO: ‘ log show_diagnostics


DEMO: Sample diagnostic message

Diagnostic Logfile Contents

Logfile: /nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log

08/23/19 19:37:06->MKP Plugins: Logfile [/nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log] cleared
08/23/19 19:37:06->MKP Plugins: Getting name=[message] code=[message] value=[Sample diagnostic message]
08/23/19 19:37:06->MKP Plugins: Getting name=[source] code=[source] value=[DEMO: ]
08/23/19 19:37:06->MKP Plugins: Getting name=[log] code=[log] value=[true]
08/23/19 19:37:06->MKP Plugins: Getting name=[show_diagnostics] code=[show_diagnostics] value=[true]
08/23/19 19:37:06->MKP Plugins: Doing code=[message] name=[message] value=[Sample diagnostic message]
08/23/19 19:37:06->MKP Plugins: Doing code=[source] name=[source] value=[DEMO: ]
08/23/19 19:37:06->MKP Plugins: Doing code=[log] name=[log] value=[true]
08/23/19 19:37:06->DEMO: Sample diagnostic message
08/23/19 19:37:06->MKP Plugins: Doing code=[show_diagnostics] name=[show_diagnostics] value=[true]