lib/lionel.rb in lionel_richie-0.1.4 vs lib/lionel.rb in lionel_richie-0.1.5
- old
+ new
@@ -1,10 +1,11 @@
require 'yajl'
require 'trello'
require 'google_drive'
require 'launchy'
require 'thor'
+require 'logger'
require 'lionel/version'
require 'lionel/cli'
require 'lionel/configuration'
require 'lionel/configurable'
require 'lionel/export'
@@ -13,6 +14,17 @@
require 'lionel/proxy_worksheet'
require 'lionel/trello_authentication'
require 'lionel/google_authentication'
module Lionel
+ extend self
+ attr_accessor :logger
+
+ def logger=(logger)
+ logger.formatter = proc do |severity, datetime, progname, msg|
+ "[#{datetime}][#{severity}]: #{msg}\n"
+ end
+ @logger = logger
+ end
end
+
+Lionel.logger = Logger.new(STDOUT)