public function get_resource()
{
if (!$this->resource) {
// create a log channel
$this->resource = new \Monolog\Logger($this->settings['name']);
foreach ($this->settings['handlers'] as $handler) {
$this->resource->pushHandler($handler);
}
foreach ($this->settings['processors'] as $processor) {
$this->resource->pushProcessor($processor);
}
}
return $this->resource;
}