Skip to content

peckadesign/MonologModule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonologModule

  • Vytváří DayFileHandler, který loguje výstup Monologu do struktury log/kanál/YYYY-MM/YYYY-MM-DD.log
  • Vytváří BlueScreenHandler, který ukládá výjimky z Tracy do log/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)