# Apm Logging Configure Problem

**URL:** <https://discuss.elastic.co/t/apm-logging-configure-problem/182175>\
**Category:** APM\
**Tags:** java\
**Created:** [May 22, 2019, 8:50am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175 "2019-05-22T08:50:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandonbai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonbai/32/42842_2.png) [@brandonbai](https://discuss.elastic.co/u/brandonbai)\
**Post date:** [May 22, 2019, 8:50am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/1 "2019-05-22T08:50:24Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

**APM Agent language and version** : Java 1.4.0

When i start my application with the following script:

```auto
java -javaagent:/root/webapp/elastic-apm-agent-1.4.0.jar \
    -Delastic.apm.service_name=my_app \
    -Delastic.apm.server_url=http://localhost:8200\
    -Delastic.apm.application_packages=com.webapp \
    -Delastic.apm.transaction_sample_rate=0.1 \
    -Delastic.apm.log_level=ERROR \
    -Delastic.apm.log_file=/dev/null \
    -Djava.security.egd=file:/dev/./urandom \
    -jar /root/webapp/app.jar

```

I can still see the apm log in the console.

Thank you!

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [May 22, 2019, 9:18am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/2 "2019-05-22T09:18:23Z")

</div>

Hi and welcome to the forum.

> [@brandonbai](#):
>
> -Delastic.apm.log\_file=/dev/null

`/dev/null` is probably not writable for the user that runs the java process.  
Specify a location to which the user you use for running the JVM has write permission.

---

<div class="post-metadata">

**Author:** ![brandonbai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonbai/32/42842_2.png) [@brandonbai](https://discuss.elastic.co/u/brandonbai)\
**Post date:** [May 22, 2019, 10:31am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/3 "2019-05-22T10:31:30Z")

</div>

The current user is the root.

**log\_file** is a confusing property.

If I set it to the value **/path/to/file** , will the log still be sent to standard output?

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [May 22, 2019, 10:47am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/4 "2019-05-22T10:47:41Z")

</div>

It shouldn't, except for the first line, saying:

```auto
Writing Elastic APM logs to /path/to/file

```

Why won't you try 🙂 ?

---

<div class="post-metadata">

**Author:** ![brandonbai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonbai/32/42842_2.png) [@brandonbai](https://discuss.elastic.co/u/brandonbai)\
**Post date:** [May 22, 2019, 11:34am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/5 "2019-05-22T11:34:11Z")

</div>

When i **head** fisrt line, it show :

```auto
Writing Elastic APM logs to /dev/null

```

And the output below shows:

```auto
2019-05-22T11:30:25.958Z	INFO	[monitoring]	log/log.go:144	Non-zero metrics in the last 30s	{"monito....

```

🤣

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [May 22, 2019, 11:49am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/6 "2019-05-22T11:49:33Z")

</div>

😄  
So, all good?

---

<div class="post-metadata">

**Author:** ![brandonbai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonbai/32/42842_2.png) [@brandonbai](https://discuss.elastic.co/u/brandonbai)\
**Post date:** [May 22, 2019, 11:57am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/7 "2019-05-22T11:57:12Z")

</div>

😂Sadly, they are all in standard output.

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [May 22, 2019, 12:11pm UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/8 "2019-05-22T12:11:53Z")

</div>

Please upload the log file contents and the standard output contents

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [May 22, 2019, 12:14pm UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/9 "2019-05-22T12:14:06Z")

</div>

> [@brandonbai](#):
>
> 2019-05-22T11:30:25.958Z INFO [monitoring] log/log.go:144

This is not the Java agent logging, maybe a FileBeat log?

---

<div class="post-metadata">

**Author:** ![brandonbai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonbai/32/42842_2.png) [@brandonbai](https://discuss.elastic.co/u/brandonbai)\
**Post date:** [May 23, 2019, 2:52am UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/10 "2019-05-23T02:52:16Z")

</div>

It is indeed a filebeat log, and mixed with the java application log.

Thank you very much!!!😀

---

<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:** [June 12, 2019, 10:52pm UTC](https://discuss.elastic.co/t/apm-logging-configure-problem/182175/11 "2019-06-12T22:52:21Z")

</div>

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