'

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

12/15/19 03:24:38->MKP Plugins: Logfile [/nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log] cleared
12/15/19 03:24:38->MKP Plugins: Getting name=[message] code=[message] value=[Sample diagnostic message]
12/15/19 03:24:38->MKP Plugins: Getting name=[source] code=[source] value=[DEMO: ]
12/15/19 03:24:38->MKP Plugins: Getting name=[log] code=[log] value=[true]
12/15/19 03:24:38->MKP Plugins: Getting name=[show_diagnostics] code=[show_diagnostics] value=[true]
12/15/19 03:24:38->MKP Plugins: Doing code=[message] name=[message] value=[Sample diagnostic message]
12/15/19 03:24:38->MKP Plugins: Doing code=[source] name=[source] value=[DEMO: ]
12/15/19 03:24:38->MKP Plugins: Doing code=[log] name=[log] value=[true]
12/15/19 03:24:38->DEMO: Sample diagnostic message
12/15/19 03:24:38->MKP Plugins: Doing code=[show_diagnostics] name=[show_diagnostics] value=[true]