Color corrections.
This commit is contained in:
parent
69a3326fea
commit
2ced54cccc
@ -101,12 +101,15 @@ class Baguette::Log
|
||||
# FIXME: def log(), that puts stuff as-is in the logs.
|
||||
|
||||
def self.debug(text)
|
||||
return unless Baguette::Context.verbosity > 2
|
||||
STDERR.puts ":: #{text}".colorize(:cyan)
|
||||
return unless Baguette::Context.verbosity > 3
|
||||
STDERR
|
||||
.<<(":: ".colorize(:cyan))
|
||||
.<<(text.colorize(:cyan))
|
||||
.<<("\n")
|
||||
STDERR.flush
|
||||
end
|
||||
def self.info(text)
|
||||
return unless Baguette::Context.verbosity > 1
|
||||
return unless Baguette::Context.verbosity > 2
|
||||
STDOUT
|
||||
.<<(":: ".colorize(:blue))
|
||||
.<<(text.colorize(:white))
|
||||
@ -114,7 +117,7 @@ class Baguette::Log
|
||||
STDOUT.flush
|
||||
end
|
||||
def self.title(text)
|
||||
return unless Baguette::Context.verbosity > 1
|
||||
return unless Baguette::Context.verbosity > 2
|
||||
STDOUT
|
||||
.<<("|> ".colorize(:blue).bright)
|
||||
.<<(text.colorize(:white).bright)
|
||||
@ -122,13 +125,19 @@ class Baguette::Log
|
||||
STDOUT.flush
|
||||
end
|
||||
def self.warning(text)
|
||||
return unless Baguette::Context.verbosity > 0
|
||||
STDERR.puts ":: #{text}".colorize(:yellow)
|
||||
return unless Baguette::Context.verbosity > 1
|
||||
STDERR
|
||||
.<<(":: ".colorize(:yellow).bright)
|
||||
.<<(text.colorize(:yellow))
|
||||
.<<("\n")
|
||||
STDERR.flush
|
||||
end
|
||||
def self.error(text)
|
||||
return unless Baguette::Context.verbosity > 0
|
||||
STDERR.puts "!! #{text}".colorize(:red)
|
||||
STDERR
|
||||
.<<("!! ".colorize(:red).bright)
|
||||
.<<(text.colorize(:red))
|
||||
.<<("\n")
|
||||
STDERR.flush
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user