Profile Image
vishnupriya

What is Error logging: -XX:ErrorFile?

What is Error logging: -XX:ErrorFile? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-errorfile

  • x-errorfile

  • Error logging

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can specify a log file for JVM irrecoverable errors with:

 

-XX:ErrorFile=filename, where filename is the desired log file location

 

Examples:

 

Create a log file java_eror.log in var/log/java folder:

 

-XX:ErrorFile=/var/log/java/java_error.log

 

Description:

 

Specifies the path and file name to which error data is written when an irrecoverable error occurs. By default, this file is created in the current working directory and named hs_err_pidpid.log where pid is the identifier of the process that caused the error. If the file can’t be created in the specified directory (due to insufficient space, a permission problem, or another issue), then the file is created in the temporary directory for the operating system.

 

Default Value:

 

Disabled by default

 

Errors:

 

None

 

Arguments related:

 

TODO link -Xloggc:gc

 

Related Posts:

NOTE:

 

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-errorfile

  • x-errorfile

  • Error logging