Skip to content

Commit

Permalink
Merge pull request hapijs#481 from wpreul/feature/413
Browse files Browse the repository at this point in the history
Adding log tag filtering information to readme
  • Loading branch information
Eran Hammer committed Feb 5, 2013
2 parents 0af3ca8 + c3f7abe commit f26dbdb
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ optional settings:
- `requestsEvent` - the event type used to capture completed requests. Defaults to 'tail'. Options are:
- 'response' - the response was sent but request tails may still be pending.
- 'tail' - the response was sent and all request tails completed.
- `subscribers` - an object where each key is a destination and each value an array subscriptions. Subscriptions available are _ops_, _request_, and _log_. The destination can be a URI or _console_. Defaults to a console subscription to all three. To disable the console output for the server instance pass an empty array into the subscribers "console" configuration.
- `subscribers` - an object where each key is a destination and each value is either an array or object with an array of subscriptions. The subscriptions that are available are _ops_, _request_, and _log_. The destination can be a URI or _console_. Defaults to a console subscription to all three. To disable the console output for the server instance pass an empty array into the subscribers "console" configuration.

For example:
```javascript
Expand All @@ -305,6 +305,18 @@ var options = {
};
```

Log messages are created with tags. Usually a log will include a tag to indicate if it is related to an error or info along with where the message originates. If, for example, the console should only output error's that were logged you can use the following configuration:
```javascript
var options = {
monitor: {
subscribers: {
console: { tags: ['error'], events: ['log'] }
}
}
};
```



### Authentication

Expand Down

0 comments on commit f26dbdb

Please sign in to comment.