Skip to content

Commit

Permalink
v3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ta-yamada committed Jan 15, 2016
1 parent 9153ec0 commit 2eb20f9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v3.2.2
- [issue #17](https://github.com/k-ta-yamada/tee_logger/issues/17)
default settings for extend and include

# v3.2.1
- [issue #18](https://github.com/k-ta-yamada/tee_logger/issues/18)
use initial value `DEFAULT_FILE`, it's change TeeLogger.logdev
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,18 @@ module YourAwesomeModule
end
```

### logfile name setting
### configuration logfile name, progname, level, formatter, and datetime_format.
```ruby
require 'tee_logger'

# Before extend or include the module, allow the setting of logdev
# sorry, `TeeLogger.logev` is deprecate.
# Before extend or include the module, allow the configuration.
# TeeLogger.logdev = 'log1.log'
TeeLogger.configure do |config|
config.logdev = 'log1.log'
config.level = Logger::Severity::INFO
config.progname = 'AwesomeApp'
config.formatter = proc { |s, t, p, m| "#{s} #{t} #{p} #{m}\n" }
# config.datetime_format = '%Y%m%d %H%M%S '
end

class YourAwesomeClass
Expand All @@ -188,8 +191,10 @@ class YourAwesomeClass
end
end

# Before extend or include the module, allow the setting of logdev
# sorry, `TeeLogger.logev` is deprecate.
# reset configuration
TeeLogger.configuration_reset

# NOTE: sorry, `TeeLogger.logev` is deprecate.
TeeLogger.logdev = 'log2.log'
module YourAwesomeModule
extend TeeLogger
Expand Down
2 changes: 1 addition & 1 deletion lib/tee_logger/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# namespace
module TeeLogger
# version number
VERSION = '3.2.1'.freeze
VERSION = '3.2.2'.freeze
end

0 comments on commit 2eb20f9

Please sign in to comment.