Generate debug logs for troubleshooting (Java)

When troubleshooting your Java agent, generate finest logs to find and investigate errors. When finished troubleshooting, be sure to set the log file back to a less verbose setting.

Generate log files

If you only change the log file setting in your newrelic.yml file, you do not need to restart the server or JVM. However, if you make any other changes, you must restart your server or JVM. Ensure you don't change the line indentation in your newrelic.yml.

To generate detailed finest log files:

  1. Edit your newrelic.yml file and change the log_level to finest.

    # The agent uses its own log file to keep its logging 
    # separate from that of your application. Specify the log level here.
    # This setting is dynamic, so changes do not require restarting your application.
    # The levels in increasing order of verboseness are:
    # off, severe, warning, info, fine, finer, finest.
    # Default is info.
    log_level: finest
  2. Exercise your web application for about five minutes to generate sufficient logging data.
  3. After testing, change the log_level to a less verbose level such as info (default).
  4. Open your log files and examine them for errors.

The "finest" log setting is a highly verbose logging level. After testing return the log_level to its original setting to reduce disk space consumption.

Examine log files

By default, log files are stored in a logs sub-directory, inside the same directory as newrelic.jar. If no log files or folder are visible, see No log file.

For more help

Additional documentation resources include the Java agent's Troubleshooting section.

Join the discussion about Java monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at