Module: HrrRbSsh::Loggable
- Included in:
- Algorithm::Publickey::EcdsaSha2, Algorithm::Publickey::SshDss, Algorithm::Publickey::SshRsa, Authentication, Authentication::Method::KeyboardInteractive, Authentication::Method::KeyboardInteractive::Context, Authentication::Method::KeyboardInteractive::InfoRequest, Authentication::Method::KeyboardInteractive::InfoResponse, Authentication::Method::None, Authentication::Method::None::Context, Authentication::Method::Password, Authentication::Method::Password::Context, Authentication::Method::Publickey, Authentication::Method::Publickey::Algorithm::Functionable, Authentication::Method::Publickey::Context, Client, Codable, Connection, Connection::Channel, Connection::Channel::ChannelType::DirectTcpip, Connection::Channel::ChannelType::ForwardedTcpip, Connection::Channel::ChannelType::Session, Connection::Channel::ChannelType::Session::RequestType::Env::Context, Connection::Channel::ChannelType::Session::RequestType::Exec::Context, Connection::Channel::ChannelType::Session::RequestType::PtyReq::Context, Connection::Channel::ChannelType::Session::RequestType::Shell::Context, Connection::Channel::ChannelType::Session::RequestType::Subsystem::Context, Connection::Channel::ChannelType::Session::RequestType::WindowChange::Context, Connection::GlobalRequestHandler, Server, Transport, Transport::CompressionAlgorithm::Functionable, Transport::CompressionAlgorithm::Unfunctionable, Transport::EncryptionAlgorithm::Functionable, Transport::EncryptionAlgorithm::Unfunctionable, Transport::KexAlgorithm::DiffieHellman, Transport::KexAlgorithm::DiffieHellmanGroupExchange, Transport::KexAlgorithm::EllipticCurveDiffieHellman, Transport::MacAlgorithm::Functionable, Transport::MacAlgorithm::Unfunctionable, Transport::Receiver, Transport::Sender, Transport::ServerHostKeyAlgorithm::Functionable
- Defined in:
- lib/hrr_rb_ssh/loggable.rb
Instance Attribute Summary collapse
-
#log_key ⇒ Object
Returns the value of attribute log_key.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
Instance Attribute Details
#log_key ⇒ Object
Returns the value of attribute log_key.
6 7 8 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 6 def log_key @log_key end |
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 6 def logger @logger end |
Instance Method Details
#log_debug ⇒ Object
32 33 34 35 36 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 32 def log_debug if logger logger.debug(log_key){ yield } end end |
#log_error ⇒ Object
14 15 16 17 18 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 14 def log_error if logger logger.error(log_key){ yield } end end |
#log_fatal ⇒ Object
8 9 10 11 12 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 8 def log_fatal if logger logger.fatal(log_key){ yield } end end |
#log_info ⇒ Object
26 27 28 29 30 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 26 def log_info if logger logger.info(log_key){ yield } end end |
#log_warn ⇒ Object
20 21 22 23 24 |
# File 'lib/hrr_rb_ssh/loggable.rb', line 20 def log_warn if logger logger.warn(log_key){ yield } end end |