public function __construct($options = [])
{
if (is_object($options) || is_string($options)) {
$options = ['adapter' => $options];
}
if (isset($options['adapter'])) {
$this->adapter = $options['adapter'];
}
if (isset($options['level'])) {
$this->setLevel($options['level']);
}
$this->_s2i = array_flip([self::LEVEL_OFF, self::LEVEL_FATAL, self::LEVEL_ERROR, self::LEVEL_WARNING, self::LEVEL_INFO, self::LEVEL_DEBUG, self::LEVEL_ALL]);
}