Created
March 8, 2018 13:09
-
-
Save 3rdp/73a9ae55b426067a9a6421ef3fc0ae89 to your computer and use it in GitHub Desktop.
Simple logger for PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TrackerPDO { | |
private static $_instance = null; | |
private static $request_log = array(); | |
private function __construct() { | |
} | |
protected function __clone() { | |
} | |
static public function getInstance() { | |
if(is_null(self::$_instance)) self::$_instance = new self(); | |
return self::$_instance; | |
} | |
public function log($entry) { | |
self::$request_log[] = $entry; | |
} | |
public function getLog() { | |
return self::$request_log; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment