如何在没有 timestamps/extra 信息的情况下查看 Heroku 日志?

How do I view Heroku logs without timestamps/extra info?

当我在 iTerm 中 运行 heroku logs 时,由于时间戳和额外信息,输出真的很难阅读。有没有办法做到这一点:

2017-03-23T10:05:30.356697+00:00 app[web.1]: D, [2017-03-23T10:05:30.356626 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]   Tenancy Load (1.2ms)  SELECT  "tenancies".* FROM "tenancies" WHERE "tenancies"."id" =  LIMIT   [["id", 27], ["LIMIT", 1]]
2017-03-23T10:05:30.378627+00:00 app[web.1]: D, [2017-03-23T10:05:30.378565 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]    (1.0ms)  BEGIN
2017-03-23T10:05:30.389814+00:00 app[web.1]: D, [2017-03-23T10:05:30.389755 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]    (1.0ms)  COMMIT
2017-03-23T10:05:30.359482+00:00 app[web.1]: D, [2017-03-23T10:05:30.359409 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]   Tenant Load (1.2ms)  SELECT  "tenants".* FROM "tenants" WHERE "tenants"."id" =  LIMIT   [["id", 37], ["LIMIT", 1]]
2017-03-23T10:05:30.379631+00:00 app[web.1]: D, [2017-03-23T10:05:30.379572 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]   CACHE (0.0ms)  SELECT  "tenancies".* FROM "tenancies" WHERE "tenancies"."id" =  LIMIT   [["id", 27], ["LIMIT", 1]]
2017-03-23T10:05:30.391164+00:00 app[web.1]: D, [2017-03-23T10:05:30.391109 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]   CACHE (0.0ms)  SELECT  "tenants".* FROM "tenants" WHERE "tenants"."id" =  LIMIT   [["id", 37], ["LIMIT", 1]]
2017-03-23T10:05:30.362098+00:00 app[web.1]: D, [2017-03-23T10:05:30.362028 #4] DEBUG -- : [7b1ab640-f23c-49fa-90c9-3cd9baa83c31]   TenancyTenant Load (1.1ms)  SELECT  "tenancy_tenants".* FROM "tenancy_tenants" WHERE "tenancy_tenants"."id" =  LIMIT   [["id", 14], ["LIMIT", 1]]

看起来像这样:

Tenancy Load (1.2ms)  SELECT  "tenancies".* FROM "tenancies" WHERE "tenancies"."id" =  LIMIT   [["id", 27], ["LIMIT", 1]]
 (1.0ms)  BEGIN
 (1.0ms)  COMMIT
Tenant Load (1.2ms)  SELECT  "tenants".* FROM "tenants" WHERE "tenants"."id" =  LIMIT   [["id", 37], ["LIMIT", 1]]
CACHE (0.0ms)  SELECT  "tenancies".* FROM "tenancies" WHERE "tenancies"."id" =  LIMIT   [["id", 27], ["LIMIT", 1]]
CACHE (0.0ms)  SELECT  "tenants".* FROM "tenants" WHERE "tenants"."id" =  LIMIT   [["id", 37], ["LIMIT", 1]]
TenancyTenant Load (1.1ms)  SELECT  "tenancy_tenants".* FROM "tenancy_tenants" WHERE "tenancy_tenants"."id" =  LIMIT   [["id", 14], ["LIMIT", 1]]

谢谢

怎么样:

heroku logs | cut -d "]" -f4