handling the write log file
This commit is contained in:
parent
8e9529bddb
commit
2cc6a15c10
19
includes/errorlog.php
Normal file
19
includes/errorlog.php
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user