lib/log.rb in forj-0.0.43 vs lib/log.rb in forj-0.0.44
- old
+ new
@@ -18,10 +18,11 @@
# create a forj.log file in ~/.hpcloud/forj.log
require 'rubygems'
require 'logger'
+require 'ansi'
require 'require_relative'
require_relative 'helpers.rb'
include Helpers
@@ -29,34 +30,9 @@
#
# Logging module
#
module Logging
-
- class SSLErrorMgt
-
- def initialize()
- @iRetry=0
- end
-
- def ErrorDetected(message,backtrace)
- if message.match('SSLv2/v3 read server hello A: unknown protocol')
- if @iRetry <5
- sleep(2)
- @iRetry+=1
- print "%s/5 try...\r" % @iRetry if $FORJ_LOGGER.level == 0
- return false
- else
- Logging.error('Too many retry. %s' % message)
- return true
- end
- else
- Logging.error("%s\n%s" % [message,backtrace.join("\n")])
- return true
- end
- end
-
- end
class ForjLog
# Class used to create 2 log object, in order to keep track of error in a log file and change log output to OUTPUT on needs (option flags).
attr_reader :level