Class: Nessus::Log
- Inherits:
-
Object
- Object
- Nessus::Log
- Defined in:
- lib/gemcache/ruby-nessus/ruby-nessus/log.rb
Class Method Summary collapse
- .break ⇒ Object
- .end ⇒ Object
-
.error(msg = nil) ⇒ Object
Errors.
-
.h1(title, msg = nil) ⇒ Object
Headers.
- .h2(title, msg = nil) ⇒ Object
- .h3(title, msg = nil) ⇒ Object
- .h4(msg = nil) ⇒ Object
- .h5(title, msg = nil) ⇒ Object
- .high(title, msg = nil) ⇒ Object
- .info(msg = nil) ⇒ Object
-
.informational(title, msg = nil) ⇒ Object
Event Severities.
-
.it(msg = nil) ⇒ Object
Formatting.
- .it!(msg = nil) ⇒ Object
- .low(title, msg = nil) ⇒ Object
- .medium(title, msg = nil) ⇒ Object
- .warn(msg = nil) ⇒ Object
Class Method Details
.break ⇒ Object
17 18 19 20 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 17 def self.break STDERR.puts "\t" STDERR.puts "" end |
.end ⇒ Object
22 23 24 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 22 def self.end STDERR.puts "\n\n" end |
.error(msg = nil) ⇒ Object
Errors
52 53 54 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 52 def self.error(msg=nil) STDERR.puts "ERROR: ".foreground(:red).bright + "#{msg}" end |
.h1(title, msg = nil) ⇒ Object
Headers
29 30 31 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 29 def self.h1(title, msg=nil) STDERR.puts "-> #{title}: ".foreground(:green).bright + "#{msg}" end |
.h2(title, msg = nil) ⇒ Object
33 34 35 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 33 def self.h2(title, msg=nil) STDERR.puts "\t#{title}: ".foreground(:blue).bright + "#{msg}" end |
.h3(title, msg = nil) ⇒ Object
37 38 39 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 37 def self.h3(title, msg=nil) STDERR.puts "\t#{title}: " + "#{msg}".foreground(:blue).underline end |
.h4(msg = nil) ⇒ Object
41 42 43 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 41 def self.h4(msg=nil) STDERR.puts "\t\t- #{msg}" end |
.h5(title, msg = nil) ⇒ Object
45 46 47 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 45 def self.h5(title, msg=nil) STDERR.puts "\t\t- #{title}: #{msg}" end |
.high(title, msg = nil) ⇒ Object
76 77 78 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 76 def self.high(title, msg=nil) STDERR.puts "\t#{title}: ".foreground(:red).bright + "#{msg}" end |
.info(msg = nil) ⇒ Object
60 61 62 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 60 def self.info(msg=nil) STDERR.puts "INFO: ".foreground(:green).bright + "#{msg}" end |
.informational(title, msg = nil) ⇒ Object
Event Severities
67 68 69 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 67 def self.informational(title, msg=nil) STDERR.puts "\t#{title}: ".foreground(:magenta).bright + "#{msg}" end |
.it(msg = nil) ⇒ Object
Formatting
9 10 11 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 9 def self.it(msg=nil) STDERR.puts "#{msg}" end |
.it!(msg = nil) ⇒ Object
13 14 15 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 13 def self.it!(msg=nil) STDERR.puts "\t#{msg}" end |
.low(title, msg = nil) ⇒ Object
70 71 72 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 70 def self.low(title, msg=nil) STDERR.puts "\t#{title}: ".foreground(:green) + "#{msg}" end |
.medium(title, msg = nil) ⇒ Object
73 74 75 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 73 def self.medium(title, msg=nil) STDERR.puts "\t#{title}: ".foreground(:yellow).bright + "#{msg}" end |
.warn(msg = nil) ⇒ Object
56 57 58 |
# File 'lib/gemcache/ruby-nessus/ruby-nessus/log.rb', line 56 def self.warn(msg=nil) STDERR.puts "WARNING: ".foreground(:yellow).bright + "#{msg}" end |