Module: EventMachine::Ssh::Log

Included in:
AuthenticationSession, Connection, PacketStream, ServerVersion, Session, Shell
Defined in:
lib/em-ssh/log.rb

Instance Method Summary collapse

Instance Method Details

#debug(msg = nil, &blk) ⇒ Object



9
10
11
# File 'lib/em-ssh/log.rb', line 9

def debug(msg = nil, &blk)
  log.debug("#{self.class}".downcase.gsub("::",".") + " #{msg}", &blk)
end

#error(msg = nil, &blk) ⇒ Object



25
26
27
# File 'lib/em-ssh/log.rb', line 25

def error(msg = nil, &blk)
  log.error("#{self.class}".downcase.gsub("::",".") + " #{msg}", &blk)
end

#fatal(msg = nil, &blk) ⇒ Object



17
18
19
# File 'lib/em-ssh/log.rb', line 17

def fatal(msg = nil, &blk)
  log.fatal("#{self.class}".downcase.gsub("::",".") + " #{msg}", &blk)
end

#info(msg = nil, &blk) ⇒ Object



13
14
15
# File 'lib/em-ssh/log.rb', line 13

def info(msg = nil, &blk)
  log.info("#{self.class}".downcase.gsub("::",".") + " #{msg}", &blk)
end

#logLogger

Returns the default logger.

Returns:

  • (Logger)

    the default logger



5
6
7
# File 'lib/em-ssh/log.rb', line 5

def log
  @logger || EventMachine::Ssh.logger
end

#warn(msg = nil, &blk) ⇒ Object



21
22
23
# File 'lib/em-ssh/log.rb', line 21

def warn(msg = nil, &blk)
  log.warn("#{self.class}".downcase.gsub("::",".") + " #{msg}", &blk)
end