Class: SSHKit::Formatter::LogFormat
- Inherits:
-
Pretty
- Object
- Pretty
- SSHKit::Formatter::LogFormat
- Defined in:
- lib/capistrano/logger/sshkit/formatters/log_format.rb
Instance Method Summary collapse
- #colorize(obj, _color, _mode = nil) ⇒ Object
- #format_message(_verbosity, message, _uuid = nil) ⇒ Object
- #log_command_exit(command) ⇒ Object
- #log_command_start(command) ⇒ Object
- #pretty_colorize ⇒ Object
Instance Method Details
#colorize(obj, _color, _mode = nil) ⇒ Object
8 9 10 |
# File 'lib/capistrano/logger/sshkit/formatters/log_format.rb', line 8 def colorize(obj, _color, _mode = nil) obj.to_s end |
#format_message(_verbosity, message, _uuid = nil) ⇒ Object
12 13 14 |
# File 'lib/capistrano/logger/sshkit/formatters/log_format.rb', line 12 def (_verbosity, , _uuid=nil) end |
#log_command_exit(command) ⇒ Object
22 23 |
# File 'lib/capistrano/logger/sshkit/formatters/log_format.rb', line 22 def log_command_exit(command) end |
#log_command_start(command) ⇒ Object
16 17 18 19 20 |
# File 'lib/capistrano/logger/sshkit/formatters/log_format.rb', line 16 def log_command_start(command) host_prefix = command.host.user ? "as #{pretty_colorize(command.host.user, :blue)}@" : 'on ' = "Running #{pretty_colorize(command, :yellow, :bold)} #{host_prefix}#{pretty_colorize(command.host, :blue)}" (command.verbosity, , command.uuid) end |
#pretty_colorize ⇒ Object
7 |
# File 'lib/capistrano/logger/sshkit/formatters/log_format.rb', line 7 alias pretty_colorize colorize |