Advertisements

log_app

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

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: