Class: TwitterFriendly::Logger
- Inherits:
-
Object
- Object
- TwitterFriendly::Logger
- Extended by:
- Forwardable
- Defined in:
- lib/twitter_friendly/logger.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(options = {}) ⇒ Logger
Returns a new instance of Logger.
10 11 12 13 14 15 16 |
# File 'lib/twitter_friendly/logger.rb', line 10 def initialize( = {}) path = [:log_dir] || File.join('log') FileUtils.mkdir_p(path) unless File.exists?(path) @logger = ::Logger.new(File.join(path, 'twitter_friendly.log')) @logger.level = [:log_level] || :debug end |