Extends
lithium\core\StaticObjectSource
public static function __init() {
$resources = Libraries::get(true, 'resources');
static::$path = $path = $resources . '/bot/logs';
if (is_writable($resources) && !is_dir($path)) {
mkdir($path, 0777, true);
}
if (!is_readable($path)) {
throw new Exception("Logs directory at `{$path}` is not readable");
}
if (!is_writable($path)) {
throw new Exception("Logs directory at `{$path}` is not writable");
}
static::$_pattern = '/^(?P<time>\d+:\d+(:\d+)?) : (?P<user>[^\s]+) : (?P<message>.*)/';
}