README.md in birling-0.1.3 vs README.md in birling-0.2.0
- old
+ new
@@ -32,24 +32,24 @@
of ten hourly logs:
```ruby
logger = Birling.open(
'test.log',
- :period => :hourly,
- :retain_count => 10
+ period: :hourly,
+ retain_count: 10
)
```
Alternatively the retention period can be expressed in terms of time where
log files that could have been created by this logger which are older than
that period will be removed:
```ruby
logger = Birling.open(
'test.log',
- :period => :hourly,
- :retain_period => 10 * 3600
+ period: :hourly,
+ retain_period: 10 * 3600
)
```
The format of the resulting log-file can be adjusted by supplying a formatter.
Several arguments passed to the formatter's `call` method, so a `lambda`, a
@@ -58,11 +58,11 @@
Example:
```ruby
logger = Birling.open(
'test.log',
- :formatter => lambda { |severity, time, program, message| "#{time}> #{message}\n" }
+ formatter: -> (severity, time, program, message) { "#{time}> #{message}\n" }
)
```
Note that the formatter is responsible for introducing any line-feeds into
the resulting output stream. This gives the formatter complete control over
@@ -74,6 +74,6 @@
on loggers that are created with an existing file-handle. For example, when
using `STDOUT` the logger will not rotate.
## Copyright
-Copyright (c) 2011-2012 Scott Tadman, The Working Group Inc.
+Copyright (c) 2011-2017 Scott Tadman, PostageApp, The Working Group Inc.