Virus In Training

Second Generation Php Logger Extreme 2.0 by mozey
June 9, 2008, 2:56 am
Filed under: blog | Tags: , ,

Often times what i’m doing does not require a bloated logger!. So here would be two cool functions to have in your class/script.

// input: array.
// output: The exact same array in your log.out.
function log_a($a)
$myFile = "/var/log/sgple20/log.out";
$fh = fopen($myFile, 'a');
fwrite($fh, "\n\n".print_r($a, TRUE).'');

// Input: A message.
// Output: The same message in your log.out.
function log_m($msg)
$myFile = "/var/log/sgple20/log.out";
$fh = fopen($myFile, 'a');
fwrite($fh, "\n".$msg."");


Leave a Comment so far
Leave a comment

Leave a Reply

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

You are commenting using your 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: