diff options
Diffstat (limited to 'lib/leap_cli/log.rb')
-rw-r--r-- | lib/leap_cli/log.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/leap_cli/log.rb b/lib/leap_cli/log.rb index 3bd4f45..25f7b74 100644 --- a/lib/leap_cli/log.rb +++ b/lib/leap_cli/log.rb @@ -21,7 +21,7 @@ module LeapCli # thread safe logger def new_logger - LeapCli::LeapLogger.new + logger.dup #LeapCli::LeapLogger.new end # deprecated @@ -101,6 +101,9 @@ module LeapCli if options[:wrap] message = message.split("\n") end + if options[:color] && prefix.empty? + message = colorize(message, options[:color], options[:style]) + end else prefix = clear_prefix end @@ -117,6 +120,10 @@ module LeapCli end end + def debug(*args) + self.log(3, *args) + end + # # Add a raw log entry, without any modifications (other than indent). # Content to be logged is yielded by the block. |