Created
October 8, 2019 16:35
-
-
Save aiiddqd/08b259f5039e83ab64cea11f68b8b304 to your computer and use it in GitHub Desktop.
Fast logger for WordPress. Set up as file to wp-content/mu-plugins/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('u/log', function($msg, $data = []){ | |
| error_log( PHP_EOL . $msg); | |
| if(!empty($data)){ | |
| ob_start(); | |
| echo PHP_EOL; | |
| var_dump($data); | |
| error_log(ob_get_clean()); | |
| } | |
| }, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment