I'm running a Sinatra App and added some custom rack middleware before it.
My problem is, when I start my application the rackup command prints all the rack stack at the end of rack startup. Something similar to:
{:inner_app=>
#<NewRelic::Agent::Instrumentation::MiddlewareProxy:0x0055e978c28bb8
@category=:middleware,
@is_app=false,
@target=
#<Rack::Cors:0x0055e978c297c0
@all_resources=
[#<Rack::Cors::Resources:0x0055e978c29608
@origins=["*"],
@public_resources=true,
@resources=
[#<Rack::Cors::Resource:0x0055e978c292c0
@credentials=true,
@expose=["Location"],
@headers=:any,
@max_age=1728000,
@methods=[:get, :post, :put, :delete, :options],
@public_resource=true>]>]
...
}
I made a lab to reproduce it easily, it is here.
In my case, the rack stack comes with some instance values defined that contains some private information that should remain secret.
I just want to stop logging this to the stdout at least in deployment environment. Does someone know what prints it and if there is any configuration that can stop it?