Avatar of curiouswebster
curiouswebster
Flag for United States of America

asked on 

WordPress/PHP has me stuck with no logging...

When I check the debug.log, I see:
Step 1
Step 2

Here is the code:
error_log("Step 1", 0);


add_action( 'save_post', 'ajax_test' );
function ajax_test() {   
    error_log( "ajax_test entered", 0);
}
error_log("Step 2", 0);

Open in new window

So, this means EITHER:
1) error_log() does not work in an action
2) The code does not enter the function, ajax_test()

Is there a plug-in needed for logging inside of an action? Will this one help?
https://wordpress.org/plugins/aryo-activity-log/

Is there another way to log data, besides error_log()? Please let me know...

Thanks.
Web DevelopmentPHPWeb Languages and StandardsScripting LanguagesWordPress

Avatar of undefined
Last Comment
curiouswebster

8/22/2022 - Mon