Module Logger::Ansicolor
In: lib/lore/facets/logger.rb

For adding ansicolor output.

Methods

Public Instance methods

[Source]

# File lib/lore/facets/logger.rb, line 192
    def debug(str)
      return unless debug?
      @logdev.ansicolor? ? debug_with_color{ super } : super
    end

[Source]

# File lib/lore/facets/logger.rb, line 225
    def debug_with_color #:yield:
      self << ANSICode.yellow
      yield
      self << ANSICode.clear
    end

[Source]

# File lib/lore/facets/logger.rb, line 197
    def error(str)
      return unless error?
      @logdev.ansicolor? ? error_with_color{ super } : super
    end

[Source]

# File lib/lore/facets/logger.rb, line 219
    def error_with_color #:yield:
      self << ANSICode.red
      yield
      self << ANSICode.clear
    end

[Source]

# File lib/lore/facets/logger.rb, line 202
    def fatal(str)
      return unless error?
      @logdev.ansicolor? ? fatal_with_color{ super } : super
    end

[Source]

# File lib/lore/facets/logger.rb, line 231
    def fatal_with_color #:yield:
      self << ANSICode.bold + ANSICode.red
      yield
      self << ANSICode.clear
    end

[Source]

# File lib/lore/facets/logger.rb, line 182
    def info(str)
      return unless info?
      @logdev.ansicolor? ? info_with_color{ super } : super
    end

[Source]

# File lib/lore/facets/logger.rb, line 207
    def info_with_color #:yield:
      self << ANSICode.green
      yield
      self << ANSICode.clear
    end

[Source]

# File lib/lore/facets/logger.rb, line 187
    def warn(str)
      return unless warn?
      @logdev.ansicolor? ? warn_with_color{ super } : super
    end

[Source]

# File lib/lore/facets/logger.rb, line 213
    def warn_with_color #:yield:
      self << ANSICode.cyan
      yield
      self << ANSICode.clear
    end

[Validate]