how to detect of if --quiet option is specified with rake.
Intention is to filter custom messages based on category.
class Category
INFO = 1
WARNING = 2
ERROR = 3
end
@trace = true
task :silent do
@trace = false
end
def trace(msg, category=Category::INFO)
return if (@trace == nil)
return if ((@trace == false) && (category == Category::INFO))
puts msg
end
In this case I would like to add one more case to filter out trace if --quiet option is specified.