# Log4j2 syslog appender ignoring facility

**URL:** <https://discuss.elastic.co/t/log4j2-syslog-appender-ignoring-facility/224122>\
**Category:** Elasticsearch\
**Created:** [March 18, 2020, 1:37pm UTC](https://discuss.elastic.co/t/log4j2-syslog-appender-ignoring-facility/224122 "2020-03-18T13:37:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_DOS\_SANTOS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_dos_santos/32/57535_2.png) [@Vincent\_DOS\_SANTOS](https://discuss.elastic.co/u/Vincent_DOS_SANTOS)\
**Post date:** [March 18, 2020, 1:37pm UTC](https://discuss.elastic.co/t/log4j2-syslog-appender-ignoring-facility/224122/1 "2020-03-18T13:37:11Z")

</div>

Hi.

I tried to configure syslog appender on elasticsearch version 6.6.

Here is my /etc/elasticsearch/log4j2.properties file

```auto
appender.syslog.type = syslog
appender.syslog.name = syslog
appender.syslog.facility = local7
appender.syslog.FacilityPrinting = true
appender.syslog.SyslogHost = localhost
appender.syslog.layout.type = PatternLayout
appender.syslog.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %.-10000m%n
appender.syslog.port = 514

rootLogger.level = info
rootLogger.appenderRef.syslog.ref = syslog

```

Here is my /etc/rsyslog.d/elastic.conf file

```auto
local7.*	-/var/log/testrsyslog/testlocal7-elastic.log
local7.* stop
user.* -/var/log/testrsyslog/testuser-elastic.log
user.* stop

```

But when I restart the 2 services, all logs go to /var/log/testrsyslog/testuser-elastic.log file.

The facility "local7" in my log4j2.properties is ignoring.

Can you help me ?

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2020, 1:37pm UTC](https://discuss.elastic.co/t/log4j2-syslog-appender-ignoring-facility/224122/2 "2020-04-15T13:37:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
