hadi
Active Member
Hello
I know clientexec has an error logging system but while I develop a plugin I use a function for myself to log errors and status in file.
I write function here
public function logme($info)
{
$filename = dirname(__FILE__) . '/' . 'log.txt';
$txt = print_r($info, true);
file_put_contents(
$filename,
PHP_EOL . '>>> ( Date:' . date("Y:m:d H:i:s") . ' )' . PHP_EOL . $txt,
FILE_APPEND | LOCK_EX
);
}
I use this in any function by calling this line $this->logme($message)
Thanks
I know clientexec has an error logging system but while I develop a plugin I use a function for myself to log errors and status in file.
I write function here
public function logme($info)
{
$filename = dirname(__FILE__) . '/' . 'log.txt';
$txt = print_r($info, true);
file_put_contents(
$filename,
PHP_EOL . '>>> ( Date:' . date("Y:m:d H:i:s") . ' )' . PHP_EOL . $txt,
FILE_APPEND | LOCK_EX
);
}
I use this in any function by calling this line $this->logme($message)
Thanks