Skip to content

Instantly share code, notes, and snippets.

@brenes
Forked from qrush/proc.rb
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save brenes/7652ff1bcbc63785c8e7 to your computer and use it in GitHub Desktop.

Select an option

Save brenes/7652ff1bcbc63785c8e7 to your computer and use it in GitHub Desktop.
# somewhere in your middleware stack...
# request.env['yourapp.someid'] = "1337"
YourApp::Application.configure do
config.log_tags = [
-> request {
request.env['yourapp.someid']
}
]
end
# [1337] Processing by ProjectsController#index as HTML
YourApp::Application.configure do
config.log_tags = ["Static"]
end
# [Static] Processing by ProjectsController#index as HTML
YourApp::Application.configure do
config.log_tags = [:uuid]
end
# [71ba53fd717c67a6677a058f4a5acdf4] Processing by ProjectsController#index as HTML
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment