Commit d2114b77 by irul

update example

1 parent 58ea95a3
......@@ -8,8 +8,24 @@ require_once 'Logger.php';
/* Define log path and log filename */
$logger = Logger::get_logger('./logs', 'my-log');
$logger->log("normal log message");
$logger->log("log with addtional arguments: %s, %s", "msg1", "msg2");
$logger->log("normal log with addtional arguments: %s, %s", "msg1", "msg2");
/* Dump */
$data = array(1,2,3);
$logger->dump($data, "data"); // or just: $logger->dump($data);
/* Log Debug */
$logger->debug("log debug");
$logger->debug("log debug with addtional arguments: %s, %s", "msg1", "msg2");
/* Log Info */
$logger->info("log info");
$logger->info("log info with addtional arguments: %s, %s", "msg1", "msg2");
/* Log Warning */
$logger->warning("log warning");
$logger->warning("log warning with addtional arguments: %s, %s", "msg1", "msg2");
/* Log Error */
$logger->error("log error");
$logger->error("log error with addtional arguments: %s, %s", "msg1", "msg2");
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!