Skip to content

Commit

Permalink
Store JVM error logs along Elasticsearch logs (#44)
Browse files Browse the repository at this point in the history
With this commit we specify the `-XX:ErrorFile` JVM parameter in
`jvm.options` and have it point to the log directory. By default, the
JVM writes this file to directory in which `java` is invoked (which is
the Elasticsearch root directory). This change simplifies archiving logs
and other data without accidentally missing the JVM error log.
  • Loading branch information
danielmitterdorfer authored Feb 12, 2020
1 parent 4dc9124 commit cb01613
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cars/v1/vanilla/templates/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
{%- endif %}

# specify an alternative path for JVM fatal error logs
{%- if log_path is defined %}
-XX:ErrorFile={{log_path}}/hs_err_pid%p.log
{%- else %}
# ${error.file}
{%- endif %}

## JDK 8 GC logging

Expand Down

0 comments on commit cb01613

Please sign in to comment.