Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable NewRelic logs when running rake task on Heroku

I have NewRelic plugged into my app, and whenever I run a rake task on Heroku I get the following output as part of the logging. There doesn't seem to be anything particularly informative or actionable in it (aside from maybe setting up SSL at some point) so I was wondering what's the best way to disable this from outputting every time I run rake.

** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Starting the New Relic agent in "production" environment.
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : To prevent agent startup add a NEWRELIC_ENABLE=false environment variable or modify the "production" section of your newrelic.yml.
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Reading configuration from config/newrelic.yml
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] WARN : Agent is configured not to use SSL when communicating with New Relic's servers
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Enabling the Request Sampler.
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Enabling the Request Sampler.
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Environment: production
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Dispatcher: thin
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Application: quickies
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Installing ActiveRecord instrumentation
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Installing Net instrumentation
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Installing deferred Rack instrumentation
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Installing Rails 3 Controller instrumentation
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Installing Rails 3.1/3.2 view instrumentation
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Installing Rails3 Error instrumentation
** [NewRelic][11/05/13 21:33:14 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Finished instrumentation
** [NewRelic][11/05/13 21:33:16 +0000 bdea8934-129f-424d-8fb8-8496711f2c74 (2)] INFO : Starting Agent shutdown
like image 613
lobati Avatar asked Feb 14 '23 18:02

lobati


1 Answers

You could change the New Relic log_level in your newrelic.yml file or via an environment variable (NEW_RELIC_LOG_LEVEL). The levels, in descending order of verbosity, are:

  • debug
  • info
  • warn
  • error
  • fatal
like image 194
lauradiane Avatar answered Feb 17 '23 20:02

lauradiane