Apm Logging Configure Problem

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 :slight_smile:

APM Agent language and version: Java 1.4.0

When i start my application with the following script:

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!

Hi and welcome to the forum.

/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.

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?

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

Writing Elastic APM logs to /path/to/file

Why won't you try :slight_smile: ?

When i head fisrt line, it show :

Writing Elastic APM logs to /dev/null

And the output below shows:

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

:rofl:

:smile:
So, all good?

:joy:Sadly, they are all in standard output.

Please upload the log file contents and the standard output contents

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

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

Thank you very much!!!:grinning:

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