Location: PHPKode > scripts > MoxieLogger > moxielogger/examples.php
<?php
	require_once("Logger.php");

	// Setup logger
	$log = new Moxiecode_Logger(array(
		"log.path" => "logs",
		"log.filename" => "{level}.log",
		"log.level" => "debug",
		"log.format" => "[{time}] [{level}] {message}",
		"log.max_size" => "10k",
		"log.max_files" => 10,
		"log.time_format" => "Y-m-d H:i:s"
	));

	// Add 500 debug messages
	for ($i=0; $i<50; $i++)
		$log->debug("This is a debug log message. Nr: " . $i);

	// Add 500 error messages
	for ($i=0; $i<50; $i++)
		$log->error("This is a error log message. Nr: " . $i);
?>
Return current item: MoxieLogger