title: How to disable NewRelic logs
body: <p>I would like to disable NewRelic logs on my Ruby application, but only on <code>test</code> environment.
  Since in the documentation we only have the log levels to set, and I want to avoid any logging, is there any option I can use to disable them?</p>
  
  <p>Here is my <code>newrelic.yml</code>:</p>
  
  <pre><code>#
  # This file configures the New Relic Agent.  New Relic monitors Ruby, Java,
  # .NET, PHP, Python and Node applications with deep visibility and low
  # overhead.  For more information, visit www.newrelic.com.
  #
  # Generated April 27, 2016, for version 3.15.2.317
  #
  # For full documentation of agent configuration options, please refer to
  # https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration
  
  common: &amp;default_settings
    # Required license key associated with your New Relic account.
    license_key: &lt;%= ENV["NEW_RELIC_LICENSE_KEY"] %&gt;
  
    # Your application name. Renaming here affects where data displays in New
    # Relic.  For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications
    app_name: &lt;%= ENV["NEW_RELIC_APP_NAME"] || 'Components' %&gt;
  
    # To disable the agent regardless of other settings, uncomment the following:
    # agent_enabled: false
    #
    # Enable or disable the transmission of data to the New Relic collector).
    monitor_mode: &lt;%= ENV["NO_INSTRUMENTATION"] == '1' ? false : true %&gt;
  
    # Log level for agent logging: error, warn, info or debug.
    log_level: &lt;%= ENV["NEW_RELIC_DEBUG_LEVEL"] || 'info' %&gt;
  
    # Enable or disable SSL for transmissions to the New Relic collector).
    # Defaults to true in versions 3.5.6 and higher.
    ssl: true
  
    # Enable or disable high security mode, a suite of security features
    high_security: false
  
    # Enable or disable synchronous connection to the New Relic data collection
    # service during application startup.
    sync_startup: false
  
    # Enable or disable the exit handler that sends data to the New Relic
    # collector) before shutting down.
    send_data_on_exit: true
  
    # Maximum number of seconds to attempt to contact the New Relic collector).
    timeout: 120
  
    # =============================== Transaction Tracer ================================
    #
    # The transaction traces feature collects detailed information from a
    # selection of transactions, including a summary of the calling sequence, a
    # breakdown of time spent, and a list of SQL queries and their query plans
    # (on mysql and postgresql). Available features depend on your New Relic
    # subscription level.
    transaction_tracer:
  
      # Enable or disable transaction traces.
      enabled: true
  
      # The agent will collect traces for transactions that exceed this time
      # threshold (in seconds). Specify a float value or apdex_f.
      #
      # apdex_f is the response time above which a transaction is considered
      # "frustrating." Defaults to four times apdex_t. Requests which complete
      # in less than apdex_t are rated satisfied. Requests which take more than
      # apdex_t, but less than four times apdex_t (apdex_f), are tolerated. Any
      # requests which take longer than apdex_f are rated frustrated.
      transaction_threshold: &lt;%= ENV['NEW_RELIC_TRANSACTION_THRESHOLD'] || 'apdex_f' %&gt;
  
      # Determines whether Redis command arguments should be recorded within
      # Transaction Traces.
      record_redis_arguments: false
  
      # Threshold (in seconds) above which the agent will collect explain plans.
      # Relevant only when explain_enabled is true.
      explain_threshold: 0.2
  
      # Enable or disable the collection of explain plans in transaction traces.
      # This setting will also apply to explain plans in Slow SQL traces if
      # slow_sql.explain_enabled is not set separately.
      explain_enabled: true
  
      # Stack traces will be included in transaction trace nodes when their duration
      # exceeds this threshold.
      stack_trace_threshold: 0.5
  
      # Maximum number of transaction trace nodes to record in a single
      # transaction trace.
      limit_segments: 4000
  
    # =============================== Error Collector ================================
    #
    # The agent collects and reports all uncaught exceptions by default. These
    # configuration options allow you to customize the error collection.
    error_collector:
  
      # Enable or disable recording of traced errors and error count metrics.
      enabled: true
  
    # ============================== Heroku ===============================
    heroku:
      use_dyno_names: true
  
    # ============================== Thread Profiler ===============================
    thread_profiler:
      enabled: true
  
  # Environment-specific settings are in this section.
  # RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
  # If your application has other named environments, configure them here.
  development:
    &lt;&lt;: *default_settings
    app_name: Orchestrator (Development)
  
    # NOTE: There is substantial overhead when running in developer mode.
    # Do not use for production or load testing.
    developer_mode: true
  
  test:
    &lt;&lt;: *default_settings
    # It doesn't make sense to report to New Relic from automated test runs.
    monitor_mode: false
  
  staging:
    &lt;&lt;: *default_settings
    app_name: Components (Staging)
  
  production:
    &lt;&lt;: *default_settings
  </code></pre>