Mercurial > SimpleWebPresenter
view Logger.inc @ 101:408ffecc9076
Added link to the official repository
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Wed, 01 Oct 2014 15:36:17 +0200 |
| parents | 74f7b64bdb78 |
| children |
line wrap: on
line source
<?php /** * Common access point for logging */ class Logger { /** * All logging goes through this function * * @param $level the severity level of this message * @param $msg message to be logged */ static function msg($level, $msg) { if (DEBUG_LEVEL >= $level) { print $msg; if(ABORT_ON_LOG) exit; } } /** * Convenience function, logs a message with level VERBOSITY_WARNING * * @param $msg message to be logged */ static function warn($msg) { self::msg(VERBOSITY_WARNING, $msg); } } ?>
