Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vidma authored and cardamo committed Oct 23, 2017
1 parent 10425d9 commit dec3a6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ For Play 2.2.x on Scala 2.10, use version 0.1:
Add a configuration file to your `conf/application.conf` with something like:

logbackaccess.config.resource=logback-access.xml
play.modules.enabled += "org.databrary.PlayLogbackAccessModule"

Then in `conf/logback-access.xml`:

Expand All @@ -70,7 +71,12 @@ There is also a `logbackaccess.context` setting if you want it to use an [execut

## Usage

The library will automatically initialize itself as a [Play Module](https://www.playframework.com/documentation/2.4.x/Modules).
The library is a [Play Module](https://www.playframework.com/documentation/2.5.x/Modules) which
you need to enable by adding this to application's `.conf` file:

play.modules.enabled += "org.databrary.PlayLogbackAccessModule"

(if you experience any issues with dependency injection (esp. during tests), please try using `PlayLogbackAccessLazyInjectModule` which does the lazy dependency injection)

Inject `PlayLogbackAccessApi` into any class to gain access to the API. This exposes:
- `log(requestTime: Long, request: RequestHeader, result: Result, user: Option[String])` - Manually log to the Access logger
Expand Down

0 comments on commit dec3a6b

Please sign in to comment.