# Logstash log4j2.properties gets overriden by dpkg

**URL:** <https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290>\
**Category:** Logstash\
**Created:** [June 21, 2017, 12:40pm UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290 "2017-06-21T12:40:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ol3k](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@ol3k](https://discuss.elastic.co/u/ol3k)\
**Post date:** [June 21, 2017, 12:40pm UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/1 "2017-06-21T12:40:59Z")

</div>

I've a problem with my custom log4j2.properties file:

While the elasticsearch config is changed to log4j2.properties.dpkg-new, the logstash properties file gets overriden by the paket manager each time I update logstash.

Is this the correct behaviour or do I have to change something in my config? Thanks.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 24, 2017, 7:03pm UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/2 "2017-06-24T19:03:44Z")

</div>

Maybe the package doesn't correctly declare that log4j2.properties is a configuration file. Which version of Logstash are you using?

---

<div class="post-metadata">

**Author:** ![ol3k](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@ol3k](https://discuss.elastic.co/u/ol3k)\
**Post date:** [July 5, 2017, 1:32pm UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/3 "2017-07-05T13:32:21Z")

</div>

Hi @magnusbaeck,

I'm currently using 5.4.2 on Debian 8.8.

```
dpkg -l | grep logstash
ii logstash 1:5.4.2-1 all An extensible logging pipeline

```

It's correct: The log4j2.properties is not mentioned in Conffiles:

```
dpkg --status logstash
Package: logstash
Status: install ok installed
Priority: extra
Section: default
Installed-Size: 172448
Maintainer: <vagrant@packer-virtualbox-iso-1497190395>
Architecture: all
Version: 1:5.4.2-1
Conffiles:
 /etc/logstash/jvm.options c4d139ba34295758cb415ce18307551f
 /etc/logstash/logstash.yml 78c6f3948978ceeaed514a5ec6c3970a
 /etc/logstash/startup.options 3e1c05d4a60f786bb9d33373b137032f
Description: An extensible logging pipeline
License: Apache 2.0
Vendor: Elasticsearch
Homepage: http://www.elasticsearch.org/overview/logstash/

```

In comparison to elasticsearch:

```
dpkg --status elasticsearch
Package: elasticsearch
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 36261
Maintainer: Elasticsearch Team <info@elastic.co>
Architecture: all
Source: elasticsearch
Version: 5.4.2
Depends: libc6, adduser, bash
Conffiles:
 /etc/elasticsearch/elasticsearch.yml 31655f8d9bce94581724510ebc90ed75
 /etc/elasticsearch/jvm.options 451ddbaacd4facb76859208671240121
 /etc/elasticsearch/log4j2.properties 7637854ddf5af38795d69f87bb6b1d76
 /usr/lib/systemd/system/elasticsearch.service a8285cf67cf81c1a0ad092fa19f6448d
 /etc/init.d/elasticsearch b84a9d90a4d0237f55dacc8a7d041735
 /etc/default/elasticsearch bc9c3b8c402dd7c8cc2cba676d5ec056
Description: Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
 Elasticsearch subproject :distribution:deb
Homepage: https://www.elastic.co/
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 13, 2017, 9:32pm UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/4 "2017-07-13T21:32:58Z")

</div>

I've filed a PR to address this

> <https://github.com/elastic/logstash/pull/7688>

---

<div class="post-metadata">

**Author:** ![ol3k](https://avatars.discourse-cdn.com/v4/letter/o/919ad9/32.png) [@ol3k](https://discuss.elastic.co/u/ol3k)\
**Post date:** [July 16, 2017, 10:56pm UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/5 "2017-07-16T22:56:24Z")

</div>

thanks!

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 17, 2017, 8:47am UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/6 "2017-07-17T08:47:10Z")

</div>

The PR has been merged to master and backported to the 5.x branch so it should end up in 6.0 and 5.6 (if the latter ever materializes).

---

<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:** [August 14, 2017, 8:47am UTC](https://discuss.elastic.co/t/logstash-log4j2-properties-gets-overriden-by-dpkg/90290/7 "2017-08-14T08:47:56Z")

</div>

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