awetestlib 0.1.13-x86-mingw32 → 0.1.14-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,20 @@
1
1
  module Awetestlib
2
2
  module Logging
3
3
 
4
+ # @deprecated
4
5
  def self.included(mod)
5
6
  # puts "RegressionSupport::Logging extended by #{mod}"
6
7
  end
7
8
 
9
+ # Format log message and write to STDOUT. Write to physical log if indicated.
10
+ # @private
11
+ # @param [Fixnum] severity Severity level of message. Use constants DEBUG, INFO, WARN, ERROR, FATAL, or UNKNOWN
12
+ # @param [String] message The message to be placed in the log.
13
+ # @param [String, Fixnum] tag Indicates the type of message. Valid string values are 'FAIL' and 'PASS'.
14
+ # Valid number values are 0 to 9.
15
+ # @param [Fixnum] lnbr the line number in the calling script
16
+ # @param [Fixnum] addts Obsolete, no longer used.
17
+ # @param [String] exception Obsolete, no longer used.
8
18
  def log_message(severity, message, tag = '', lnbr = nil, addts = 1, exception=nil)
9
19
  # caller = get_caller(lnbr, exception)
10
20
 
@@ -50,6 +60,10 @@ module Logging
50
60
 
51
61
  #private log_message
52
62
 
63
+ # Translates tag value to corresponding value for +pass+ column in database.
64
+ # @private
65
+ # @param [String, Fixnum] tag
66
+ # @return [String] Single character
53
67
  def pass_code_for(tag)
54
68
  case
55
69
  when tag =~ /PASS/
@@ -204,7 +218,7 @@ tags: log, error, fail, reference, tag, report
204
218
  @my_failed_count += 1 if @my_failed_count
205
219
  parse_error_references(message, true)
206
220
  @report_class.add_to_report("#{message}" + " [#{get_caller(lnbr)}]","FAILED")
207
- log_message(WARN, "#{message}" + " (#{lnbr})]", FAIL, lnbr)
221
+ log_message(WARN, "#{message}", FAIL, lnbr)
208
222
  end
209
223
 
210
224
  alias validate_failed_tolog failed_to_log
@@ -302,7 +316,7 @@ tags: log, caller, trace, report
302
316
  end
303
317
  end
304
318
  logger = ActiveSupport::BufferedLogger.new(logFile)
305
- logger.level = Logger::DEBUG
319
+ logger.level = ActiveSupport::BufferedLogger::DEBUG
306
320
  logger.auto_flushing = (true)
307
321
  logger.add(INFO, "#{logFile}\n#{ENV["OS"]}")
308
322
  logger
@@ -408,4 +422,4 @@ tags: error, fail, hits, reference, tag, tallies
408
422
  end
409
423
 
410
424
  end
411
- end
425
+ end