Skip to content

Commit

Permalink
Add a grep example to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Apr 14, 2018
1 parent 735b7f9 commit e109a3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ iex> RingLogger.tail
:ok
```

You can also `grep`:

```elixir
iex> RingLogger.grep(~r/[Nn]eedle/)

16:55:41.614 [info] Needle in a haystack
```

## Programmatic usage

It can be useful to get a snapshot of the log when an unexpected event occurs.
Expand Down

0 comments on commit e109a3d

Please sign in to comment.