Class | YARD::Logger
In: | lib/yard/logging.rb
Parent: | ::Logger

Handles console logging for info, warnings and errors. Uses the stdlib Logger class in Ruby for all the backend logic.

### Methods

backtrace debug enter_level instance new show_backtraces warn_no_continuations

### Attributes

show_backtraces | [W] |

### Public Class methods

instance(pipe = STDERR)

The logger instance @return [Logger] the logger instance

new(*args)

Creates a new logger

### Public Instance methods

backtrace(exc)

Prints the backtrace `exc` to the logger as error data.

@param [Array<String>] exc the backtrace list @return [void]

debug(*args)

Changes the debug level to DEBUG if $DEBUG is set and writes a debugging message.

enter_level(new_level = level) {|| ...}

Sets the logger level for the duration of the block

@example

      log.enter_level(Logger::ERROR) do
        YARD.parse_string "def x; end"
      end

@param [Fixnum] new_level the logger level for the duration of the block.

      values can be found in Ruby's Logger class.

@yield the block with the logger temporarily set to `new_level`

show_backtraces()
warn_no_continuations()

Warns that the Ruby environment does not support continuations. Applies to JRuby, Rubinius and MacRuby. This warning will only display once per Ruby process.

@deprecated Continuations are no longer needed by YARD 0.8.0+. @return [void]

[Validate]