client log config
This commit is contained in:
parent
505f111e82
commit
b0d88bc2bf
|
@ -24,12 +24,14 @@ class Client
|
||||||
{
|
{
|
||||||
$default = [
|
$default = [
|
||||||
'app' => '***',
|
'app' => '***',
|
||||||
|
'log_path'=> "/logs/rpc_monitor_".date("Ymd").".log",
|
||||||
|
'log_formatter' => 'LogstashFormatter',
|
||||||
];
|
];
|
||||||
$stream = new StreamHandler(app()->storagePath()."/logs/rpc_monitor_".date("Ymd").".log");
|
$this->config = array_merge($default, $config);
|
||||||
$stream->setFormatter(new LogstashFormatter());
|
$stream = new StreamHandler(app()->storagePath().$this->config['log_path']);
|
||||||
|
$stream->setFormatter(new $this->config['log_formatter']());
|
||||||
$logger = new Logger('RPC.LOGGER');
|
$logger = new Logger('RPC.LOGGER');
|
||||||
$logger->pushHandler($stream);
|
$logger->pushHandler($stream);
|
||||||
$this->config = array_merge($default, $config);
|
|
||||||
$this->id = 0;
|
$this->id = 0;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user