def direct_log(log_level, &blocK)
      @config.ui.logger.nil? and raise BaseError, "You must supply a logger for direct logging support!"

      if !block_given?
        log_and_raise(BaseError, "You must supply a block to the log method!")
      elsif (@config.ui.logger.level <= ::Logger.const_get(log_level.to_s.upcase))
        @config.ui.logger << ZTK::ANSI.uncolor(yield)
      end
    end
def direct_log(log_level, &blocK)
      @config.ui.logger.nil? and raise BaseError, "You must supply a logger for direct logging support!"

      if !block_given?
        log_and_raise(BaseError, "You must supply a block to the log method!")
      elsif (@config.ui.logger.level <= ::Logger.const_get(log_level.to_s.upcase))
        @config.ui.logger << ZTK::ANSI.uncolor(yield)
      end
    end
Direct logging method.

 This method provides direct writing of data to the current log device.
 This is mainly used for pushing STDOUT and STDERR into the log file in
 ZTK::SSH and ZTK::Command, but could easily be used by other classes.

 The value returned in the block is passed down to the logger specified in
 the classes configuration.

 @param [Symbol] log_level This should be any one of [:debug, :info, :warn, :error, :fatal].
 @yield No value is passed to the block.
 @yieldreturn [String] The message to log.