mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Allow to configure syslog tag (#3596)
* Allow to configure syslog tag Author-Change-Id: IB#1120629 * Update InitializeProcessor.php
This commit is contained in:
parent
024964eafb
commit
b9800b7c35
|
|
@ -1156,6 +1156,13 @@ form:
|
|||
local6: local6
|
||||
local7: local7
|
||||
|
||||
log.syslog.tag:
|
||||
type: text
|
||||
size: small
|
||||
label: PLUGIN_ADMIN.SYSLOG_TAG
|
||||
help: PLUGIN_ADMIN.SYSLOG_TAG_HELP
|
||||
placeholder: "grav"
|
||||
|
||||
debugger:
|
||||
type: tab
|
||||
title: PLUGIN_ADMIN.DEBUGGER
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ log:
|
|||
handler: file # Log handler. Currently supported: file | syslog
|
||||
syslog:
|
||||
facility: local6 # Syslog facilities output
|
||||
tag: grav # Syslog tag. Default: "grav".
|
||||
|
||||
debugger:
|
||||
enabled: false # Enable Grav debugger and following settings
|
||||
|
|
|
|||
|
|
@ -251,7 +251,8 @@ class InitializeProcessor extends ProcessorBase
|
|||
$log->popHandler();
|
||||
|
||||
$facility = $config->get('system.log.syslog.facility', 'local6');
|
||||
$logHandler = new SyslogHandler('grav', $facility);
|
||||
$tag = $config->get('system.log.syslog.tag', 'grav');
|
||||
$logHandler = new SyslogHandler($tag, $facility);
|
||||
$formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%");
|
||||
$logHandler->setFormatter($formatter);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user