Skip to content

Instantly share code, notes, and snippets.

@rurounijones
Created September 11, 2012 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rurounijones/3694987 to your computer and use it in GitHub Desktop.
Save rurounijones/3694987 to your computer and use it in GitHub Desktop.
Logstash Formatted JSON log entry from Rails
Started GET "/account/register" for 127.0.0.1 at 2012-09-11 09:10:20 +0900
Processing by AccountController#register as HTML
(0.1ms) SELECT MAX("settings"."updated_on") AS max_id FROM "settings"
AnonymousUser Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."type" IN ('AnonymousUser') LIMIT 1
Setting Load (0.1ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'default_language' LIMIT 1
Setting Load (0.1ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'password_min_length' LIMIT 1
CustomField Load (0.1ms) SELECT "custom_fields".* FROM "custom_fields" WHERE (type = 'UserCustomField') ORDER BY position
Rendered account/register.html.erb within layouts/base (50.7ms)
UserPreference Load (0.1ms) SELECT "user_preferences".* FROM "user_preferences" WHERE "user_preferences"."user_id" = 2 LIMIT 1
Completed 200 OK in 62ms (Views: 58.7ms | ActiveRecord: 0.9ms)
{
"@source": "jjones-desktop",
"@type": "rails_json",
"@tags": [],
"@fields": {
"uuid": "dc48dc35c49ce749533c3b0348921602",
"client_ip": "127.0.0.1",
"method": "GET",
"path": "/account/register",
"sql": [
{
"name": null,
"duration": 0.117928
},
{
"name": "AnonymousUser Load",
"duration": 0.124673
},
{
"name": "Setting Load",
"duration": 0.063637
},
{
"name": "Setting Load",
"duration": 0.08729999999999999
},
{
"name": "SCHEMA",
"duration": 0.12130400000000001
},
{
"name": "SCHEMA",
"duration": 0.157786
},
{
"name": "SCHEMA",
"duration": 0.092298
},
{
"name": "CustomField Load",
"duration": 0.10041900000000001
},
{
"name": "UserPreference Load",
"duration": 0.078023
}
],
"rendering": [
{
"identifier": "account/register.html.erb",
"layout": "layouts/base",
"duration": 50.711135999999996
}
],
"controller": "AccountController",
"controller_duration": 62.146076,
"action": "register",
"format": "html",
"status": 200,
"rendering_duration": 50.711135999999996,
"sql_duration": 0.943368
},
"@timestamp": "2012-09-11T00:10:20.726782Z",
"@message": "GET /account/register for 127.0.0.1",
"@source_host": null,
"@source_path": "jjones-desktop"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment