PHP code example of zero1 / module-custom-logging
1. Go to this page and download the library: Download zero1/module-custom-logging library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zero1 / module-custom-logging example snippets
'logging' => [
'hardware_instance' => 'server1-blahblah',
'stack' => 'non_production'
],
'logging' => [
'stacks' => [
'production' => [
'handlers' => [
'productionDefaultLogger' => [],
],
'common_formatter' => \Monolog\Formatter\JsonFormatter::class,
'common_processors' => [
\Monolog\Processor\GitProcessor::class,
\Monolog\Processor\IntrospectionProcessor::class,
\Monolog\Processor\WebProcessor::class,
\Zero1\CustomLogging\Logger\Processor\HardwareInstance::class,
]
],
'non_production' => [
'handlers' => [
'nonProductionDefaultLogger' => [],
'nonProductionDebugLogger' => [],
],
'common_formatter' => 'loggingLineFormatter',
'common_processors' => [
\Monolog\Processor\GitProcessor::class,
\Monolog\Processor\IntrospectionProcessor::class,
\Monolog\Processor\WebProcessor::class,
\Zero1\CustomLogging\Logger\Processor\HardwareInstance::class,
]
]
]
]
'common_processors' => [
\Monolog\Processor\GitProcessor::class,
\Monolog\Processor\IntrospectionProcessor::class,
\Monolog\Processor\WebProcessor::class,
\Zero1\CustomLogging\Logger\Processor\HardwareInstance::class,
]
'handlers' => [
'nonProductionDefaultLogger' => [],
'nonProductionDebugLogger' => [],
]