• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Generate debug logs for troubleshooting (Java)

When troubleshooting your New Relic 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, such as info.

Requirements

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.

Be sure you keep the original line indentation in your newrelic.yml file. YAML is "space sensitive" and requires proper indentation.

The audit_mode setting (when set to true ) will also log communication between the Java agent and New Relic to the log file. New Relic Support may occasionally request audit mode logs for additional troubleshooting.

Generate log files

To generate detailed finest log files:

  1. Edit your newrelic.yml file, and change the log_level to finest. Be sure to keep these lines indented two spaces.

    # 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
    # Log all data sent to and from New Relic in plain text.
    # This setting is dynamic, so changes do not require restarting your application.
    # Default is false.
    audit_mode: false
  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.

Examine log files

Importante

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

By default, log files are stored in a logs sub-directory, inside the same directory as newrelic.jar. If necessary, follow the troubleshooting procedures if no log files appear.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.