|
@@ 89-97 (lines=9) @@
|
| 86 |
|
* |
| 87 |
|
* @since 1.0 |
| 88 |
|
*/ |
| 89 |
|
public function getMonologHandlerApplicationService(Container $container) |
| 90 |
|
{ |
| 91 |
|
/** @var \Joomla\Registry\Registry $config */ |
| 92 |
|
$config = $container->get('config'); |
| 93 |
|
|
| 94 |
|
$level = strtoupper($config->get('log.application', $config->get('log.level', 'error'))); |
| 95 |
|
|
| 96 |
|
return new StreamHandler(APPROOT . '/logs/stats.log', constant('\\Monolog\\Logger::' . $level)); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
/** |
| 100 |
|
* Get the `monolog.handler.database` service |
|
@@ 108-117 (lines=10) @@
|
| 105 |
|
* |
| 106 |
|
* @since 1.0 |
| 107 |
|
*/ |
| 108 |
|
public function getMonologHandlerDatabaseService(Container $container) |
| 109 |
|
{ |
| 110 |
|
/** @var \Joomla\Registry\Registry $config */ |
| 111 |
|
$config = $container->get('config'); |
| 112 |
|
|
| 113 |
|
// If database debugging is enabled then force the logger's error level to DEBUG, otherwise use the level defined in the app config |
| 114 |
|
$level = $config->get('database.debug', false) ? 'DEBUG' : strtoupper($config->get('log.database', $config->get('log.level', 'error'))); |
| 115 |
|
|
| 116 |
|
return new StreamHandler(APPROOT . '/logs/stats.log', constant('\\Monolog\\Logger::' . $level)); |
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
/** |
| 120 |
|
* Get the `monolog.logger.application` service |