[svk-commit] r2147 - in branches/svk-logging/lib/SVK: .

stig at bestpractical.com stig at bestpractical.com
Thu Nov 16 06:35:18 EST 2006


Author: stig
Date: Thu Nov 16 06:35:17 2006
New Revision: 2147

Modified:
   branches/svk-logging/lib/SVK/Help/Environment.pod
   branches/svk-logging/lib/SVK/Logger.pm

Log:
rename the variable used for controlling the loglevel, and document it in the environment help page

Modified: branches/svk-logging/lib/SVK/Help/Environment.pod
==============================================================================
--- branches/svk-logging/lib/SVK/Help/Environment.pod	(original)
+++ branches/svk-logging/lib/SVK/Help/Environment.pod	Thu Nov 16 06:35:17 2006
@@ -53,6 +53,13 @@
 If you want svk to spawn a specific merge tool, set this variable to
 the tool's name.
 
+=item $SVKLOGLEVEL
+
+The lowest log level that svk will present to the user. The log levels
+are: DEBUG, INFO, WARN, ERROR and FATAL. The default log level is INFO;
+this includes progress messages for long-running commands (such as
+sync). For non-interactive use (such as for cron jobs) it might be
+useful to set $SVKLOGLEVEL to WARN.
 
 =item $SVKRESOLVE
 

Modified: branches/svk-logging/lib/SVK/Logger.pm
==============================================================================
--- branches/svk-logging/lib/SVK/Logger.pm	(original)
+++ branches/svk-logging/lib/SVK/Logger.pm	Thu Nov 16 06:35:17 2006
@@ -8,7 +8,7 @@
 
 my $level = {
     map { $_ => uc $_ } qw( debug info warn error fatal )
-}->{ lc $ENV{SVKDEBUG} } || 'INFO';
+}->{ lc $ENV{SVKLOGLEVEL} } || 'INFO';
 
 my $conf = qq{
   log4perl.rootLogger=$level, Screen
@@ -74,14 +74,10 @@
 
 Ideally, for support requests, if something is not going the way it
 should be we should be able to tell people: "rerun the command with the
-SVKDEBUG=1 environment variable set and mail the output to
-$SUPPORTADDRESS":
+SVKLOGLEVEL environment variable set to DEBUG and mail the output to
+$SUPPORTADDRESS". On Unix, this could be accomplished in one command like so:
 
-  env SVKDEBUG=1 svk <command that failed> 2>&1 | mail $SUPPORTADDRESS
-
-On Windows, the same can be achieved by doing:
-
-  XXX - somebody clueful please fill in -- I don't know Windows
+  env SVKLOGLEVEL=DEBUG svk <command that failed> 2>&1 | mail $SUPPORTADDRESS
 
 =head1 AUTHORS
 


More information about the svk-commit mailing list