---
title: Generating logs for troubleshooting (Ruby)
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/troubleshooting/generating-logs-troubleshooting-ruby
---

Detailed debug logging can help troubleshoot your standard Ruby agent installation.

> #### ⚠️ IMPORTANT
>
> If you are using Heroku, see [Ruby agent and Heroku](https://docs.newrelic.com/docs/agents/ruby-agent/miscellaneous/ruby-agent-heroku#logging).

## Generating log files [#generating]

To generate detailed New Relic for Ruby log files:

1.  Open your `newrelic.yml` file in an editor.
2.  Change the [`log_level`](https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration#log_level) to `debug` and save the file. Ensure you do not modify the indentation.

    > #### ⚠️ IMPORTANT
    >
    > `debug` is a highly verbose logging level. Ensure you return to your previous `log_level` after you generate debug-level logs.
3.  Restart your web application.
4.  Generate some traffic to your app and run it for about five minutes.
5.  Examine your log file for errors. By default, your log file is located in your app's log folder and is named `newrelic_agent.log`.
6.  If sending your log file to New Relic Support, attach the log file to your support ticket, along with `newrelic.yml`, your Gemfile, and `Gemfile.lock`.
7.  Edit `newrelic.yml` again and change the [`log_level`](https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration#log_level) to the previous setting. Save the file.
