lib/git_cli/global.rb in git_cli-0.5.0 vs lib/git_cli/global.rb in git_cli-0.6.0

- old
+ new

@@ -22,11 +22,18 @@ class Global include Singleton attr_reader :logger def initialize - @logger = Tlogger.new + debug = ENV['GitCli_Debug'] + debugOut = ENV['GitCli_DebugOut'] || STDOUT + if debug.nil? + @logger = Tlogger.new('git_cli.log', 5, 1024*1024*10) + else + @logger = Tlogger.new(debugOut) + end end + end class GitCliException < StandardError; end end