Skip to content

Instantly share code, notes, and snippets.

@3rdp
Created March 8, 2018 13:09
Show Gist options
  • Save 3rdp/73a9ae55b426067a9a6421ef3fc0ae89 to your computer and use it in GitHub Desktop.
Save 3rdp/73a9ae55b426067a9a6421ef3fc0ae89 to your computer and use it in GitHub Desktop.
Simple logger for PHP
<?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