adomokos/light-service — pull request #53 by adomokos (2014-08-07 02:06:32+00:00)
Title: Logging

You can turn on LightService logging with this setting:

```ruby
LightService::Configuration.logger = Logger.new(STDOUT)
```

You will have something like this:
```bash
+I, [2014-08-06T21:02:52.765278 #44103] INFO -- : [LightService] - calling organizer
I, [2014-08-06T21:02:52.765330 #44103] INFO -- : [LightService] - keys in context: :tea, :milk, :coffee
I, [2014-08-06T21:02:52.765390 #44103] INFO -- : [LightService] - executing
I, [2014-08-06T21:02:52.765415 #44103] INFO -- : [LightService] - expects: :tea, :milk
I, [2014-08-06T21:02:52.765430 #44103] INFO -- : [LightService] - promises: :milk_tea
I, [2014-08-06T21:02:52.765462 #44103] INFO -- : [LightService] - keys in context: :tea, :milk, :coffee, :milk_tea
I, [2014-08-06T21:02:52.765511 #44103] INFO -- : [LightService] - executing
I, [2014-08-06T21:02:52.765533 #44103] INFO -- : [LightService] - expects: :coffee, :milk
I, [2014-08-06T21:02:52.765547 #44103] INFO -- : [LightService] - promises: :latte
I, [2014-08-06T21:02:52.765561 #44103] INFO -- : [LightService] - keys in context: :tea, :milk, :coffee, :milk_tea, :latte
```

It also logs `failures` and `skip_alls`.

```bash
I, [2014-08-06T21:05:38.548453 #44507] INFO -- : [LightService] - calling organizer
I, [2014-08-06T21:05:38.548477 #44507] INFO -- : [LightService] - keys in context: :milk, :coffee
W, [2014-08-06T21:05:38.548524 #44507] WARN -- : [LightService] - :-((( has failed...
W, [2014-08-06T21:05:38.548541 #44507] WARN -- : [LightService] - context message: Can't make a latte from a milk that's too hot!
```