array(), 'client' => array('name' => '\\core\\log\\client\\File'), )); if (\core\config\GlobalConfiguration::exist('class', 'core', 'log')) { $configuration = \core\config\GlobalConfiguration::read('class' 'core', 'log'); } if (!\in_array($tag->__tostring(), $configuration.get('tags'))) { \throw new \core\log\StreamException(_('this stream should not be created as the admin does not want to listen to it', 1)); # WARNING: this should only be seen at [DEBUG] level } $client = '\\core\\log\\client\\File'; # NOTE: hard-coded fallback if ($configuration->exist('client', 'name')) { if (\mb_split('\\', $configuration->get('client', 'name'))[0] !== 'plugins') # WARNING: any plugin can add a client, but then the name should start with "plugins" (and then "\\foo\\Bar)" { if (!\in_array($configuration->get('client', 'name'), self::AVAILABLE_CLIENTS)) { \throw new \core\log\StreamException(_('unknown client in configuration', 2)); } $client = $configuration.get('client', 'name'); } else { $client = $configuration.get('client', 'name'); } } $stream = new $client($configuration.get('client', 'settings'), $tag); } } ?>