README.md in tee_logger-3.1.0 vs README.md in tee_logger-3.1.1

- old
+ new

@@ -1,9 +1,10 @@ [![Gem Version](https://badge.fury.io/rb/tee_logger.svg)](http://badge.fury.io/rb/tee_logger) [![Build Status](https://travis-ci.org/k-ta-yamada/tee_logger.svg)](https://travis-ci.org/k-ta-yamada/tee_logger) [![Code Climate](https://codeclimate.com/github/k-ta-yamada/tee_logger/badges/gpa.svg)](https://codeclimate.com/github/k-ta-yamada/tee_logger) [![Test Coverage](https://codeclimate.com/github/k-ta-yamada/tee_logger/badges/coverage.svg)](https://codeclimate.com/github/k-ta-yamada/tee_logger/coverage) +[![Inline docs](http://inch-ci.org/github/k-ta-yamada/tee_logger.svg?branch=master)](http://inch-ci.org/github/k-ta-yamada/tee_logger) > Sorry. In from version 2 to version 3, changed usage. > see also [CHANGELOG.md](https://github.com/k-ta-yamada/tee_logger/blob/master/CHANGELOG.md). - [Rubygems.org](https://rubygems.org/gems/tee_logger) @@ -112,9 +113,36 @@ tl.formatter # => nil or Proc tl.formatter = proc { |severity, datetime, progname, message| "#{severity}:#{message}" } tl.datetime_format # => nil or Proc tl.datetime_format = '%Y%m%d %H%M%S ' +``` + + +## include or extend TeeLogger for casual use + +> TODO: the log file will be in default of `./tee_logger.log` + +```ruby +require 'tee_logger' + +class YourAwesomeClass + include TeeLogger + + def awesome_method + # do somthing + logger.info 'this is message is logging and disp console' + end +end + +module YourAwesomeModule + extend TeeLogger + + def self.awesome_method + # do somthing + logger.info 'this is message is logging and disp console' + end +end ``` ## Development