Definition:
function log_app($label,$msg) {}
Writes logging info to a file.
Parameters
- string $label: Type of logging
- string $msg: Information describing logging reason.
Source code
function log_app($label,$msg) {
global $app_logging;
if ($app_logging) {
$fp = fopen( 'wp-app.log', 'a+');
$date = gmdate( 'Y-m-d H:i:s' );
fwrite($fp, "\n\n$date - $label\n$msg\n");
fclose($fp);
}
}
2303

February 12, 2011 


No comments yet... Be the first to leave a reply!