mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
Add specific syslogtag
This commit is contained in:
parent
11e7a1d1f7
commit
c27ff5c580
@ -186,6 +186,7 @@ imgproxy can send logs to syslog, but this feature is disabled by default. To en
|
||||
* `IMGPROXY_SYSLOG_LEVEL`: maximum log level to send to syslog. Known levels are: `crit`, `error`, `warning` and `notice`. Default: `notice`;
|
||||
* `IMGPROXY_SYSLOG_NETWORK`: network that will be used to connect to syslog. When blank, the local syslog server will be used. Known networks are `tcp`, `tcp4`, `tcp6`, `udp`, `udp4`, `udp6`, `ip`, `ip4`, `ip6`, `unix`, `unixgram` and `unixpacket`. Default: blank;
|
||||
* `IMGPROXY_SYSLOG_ADDRESS`: address of the syslog service. Not used if `IMGPROXY_SYSLOG_NETWORK` is blank. Default: blank;
|
||||
* `IMGPROXY_SYSLOG_TAG`: specific syslogtag. Default: `imgproxy`;
|
||||
|
||||
### Memory usage tweaks
|
||||
|
||||
|
@ -34,7 +34,10 @@ func initSyslog() {
|
||||
strEnvConfig(&network, "IMGPROXY_SYSLOG_NETWORK")
|
||||
strEnvConfig(&addr, "IMGPROXY_SYSLOG_ADDRESS")
|
||||
|
||||
syslogWriter, err = syslog.Dial(network, addr, syslog.LOG_NOTICE, "imgproxy")
|
||||
tag := "imgproxy"
|
||||
strEnvConfig(&tag, "IMGPROXY_SYSLOG_TAG")
|
||||
|
||||
syslogWriter, err = syslog.Dial(network, addr, syslog.LOG_NOTICE, tag)
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Can't connect to syslog: %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user