Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Add tags
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Feb 19, 2017
1 parent 2add2b2 commit 2364855
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ way to benchmark code execution:
start = Time.now
# ...my code to time...
time_ms = (Time.now - start) * 1000
logger.info(message: "Task complete", time_ms: time_ms)
logger.info(message: "Task complete", tag: "my_task", time_ms: time_ms)

# My log message @metadata {"level": "info", "time_ms": 54.2132, "context": {...}}
# My log message @metadata {"level": "info", tags: ["my_task"], "time_ms": 54.2132, "context": {...}}
```

* In the Timber console use the query: `time_ms>500`
* In the Timber console use the query: `tag:my_task time_ms>500`
* The Timber console will also display this value inline with your logs. No need to include it
in the log message, but you certainly can if you'd prefer.

Expand Down

0 comments on commit 2364855

Please sign in to comment.