1 | <?php |
||
20 | abstract class Logging |
||
21 | { |
||
22 | //<editor-fold desc="Fields"> |
||
23 | /** @var bool */ |
||
24 | public static $testing = false; |
||
25 | public static $storagePathFunction = 'storage_path'; |
||
26 | /** @var Logger[] */ |
||
27 | private static $loggers = []; |
||
28 | //</editor-fold desc="Fields"> |
||
29 | |||
30 | //<editor-fold desc="Public Methods"> |
||
31 | /** @noinspection PhpDocMissingThrowsInspection */ //InvalidArgumentException, Exception |
||
32 | /** |
||
33 | * Logs the given message in the given logger |
||
34 | * @param string $message the message to log |
||
35 | * @param string $logger the logger to use |
||
36 | * @param int $type the type of the message |
||
37 | * @throws \Tfboe\FmLib\Exceptions\ValueNotValid invalid logger |
||
38 | */ |
||
39 | public static function log(string $message, string $logger = Logs::GENERAL, int $type = Logger::INFO) |
||
56 | //</editor-fold desc="Public Methods"> |
||
57 | } |