pd / monolog-module
Integrace Monologu do projektů PeckaDesign
Installs: 46 035
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 21
Forks: 0
Open Issues: 1
Requires
- php: 7.4.* || 8.*
- monolog/monolog: 2.8.*
- nette/application: 2.4.* || ^3.0.0
- nette/di: 2.4.* || ^3.0.0
- nette/utils: 2.5.* || ^3.0.0
- tracy/tracy: ^2.6.0
Requires (Dev)
- nette/bootstrap: ^3.1
- nette/tester: 2.4.*
- pd/coding-standard: 1.27.*
- phpstan/phpstan: 1.2.0
- phpstan/phpstan-strict-rules: 1.1.0
README
- Vytváří
DayFileHandler
, který loguje výstup Monologu do strukturylog/kanál/YYYY-MM/YYYY-MM-DD.log
- Vytváří
BlueScreenHandler
, který ukládá výjimky z Tracy dolog/exception/YYYY-MM/
- Napojuje logování z Tracy do Monologu
Instalace
$ composer require pd/monolog-module
Nastavení
# common.neon
extensions:
pd.monolog: \Pd\MonologModule\DI\Extension
pd.monolog:
name: projekt
services:
myService:
arguments:
logger: @\Pd\MonologModule\ChannelLoggerFactory::create('myChannel')
-
factory: \Monolog\Processor\WebProcessor
-
factory: \Pd\MonologModule\Handlers\DayFileHandler
arguments:
appName: myProjectName
logDir: %logDir%
-
factory: \Pd\MonologModule\Processors\BlueScreenProcessor
arguments:
logDir: %logDir%
pd.monolog.logger:
setup:
- pushProcessor(@\Monolog\Processor\WebProcessor)
- pushProcessor(@\Pd\MonologModule\Processors\BlueScreenProcessor)
- pushHandler(@\Pd\MonologModule\Handlers\DayFileHandler)
- pushHandler(@\Pd\CoreModule\LogModule\Handlers\NewRelicHandler)