commit ac2d27b230c0afc36eafddec1c387a6ab68a837d
parent eaa762c5b245231324fc3f222351b09833881f65
Author: Carl Worth <cworth@cworth.org>
Date: Wed, 26 Aug 2009 14:35:25 -0700
make SUP_LOG_LEVEL self-documenting
The idea here is that if someone is looking at the log and not seeing
the information of interest, then the log itself should tell them
how to get more information, (by suggesting to set SUP_LOG_LEVEL
to the next lower level).
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -187,6 +187,9 @@ begin
lmode.on_kill { Logger.clear! }
Logger.add_sink lmode
Logger.force_message "Welcome to Sup! Log level is set to #{Logger.level}."
+ if Logger::LEVELS.index(Logger.level) > 0
+ Logger.force_message "For more verbose logging, restart with SUP_LOG_LEVEL=#{Logger::LEVELS[Logger::LEVELS.index(Logger.level)-1]}."
+ end
debug "initializing inbox buffer"
imode = InboxMode.new