handling the write log file

This commit is contained in:
Antoine M 2024-11-05 13:12:13 +01:00
parent 8e9529bddb
commit 2cc6a15c10

19
includes/errorlog.php Normal file
View File

@ -0,0 +1,19 @@
<?php
// #################################
// FUNCTION ERROR LOG
// #################################
// Error log
if (!function_exists('write_log')) {
function write_log($log) {
if (true === WP_DEBUG) {
if (is_array($log) || is_object($log)) {
error_log(print_r($log, true));
} else {
error_log($log);
}
}
}
}