--- src/log_shl.c.orig	2005-10-24 11:40:32.000000000 +1000
+++ src/log_shl.c	2013-09-23 22:49:04.000000000 +1000
@@ -48,19 +48,20 @@ int UT_log_msg_shl(int argc, char *argv[
 
     if (argc != 2) {
         UT_shlf("usage: log %s log_message", argv[0]);
-        return;
+        return -1;
     }
     
     /* Convert the log level string to numeric value and write log message */
     for (i=0; (p = UT_loglevel_strs[i]) != NULL; i++) {
         if (!strcmp( p, argv[0] )) {
             UT_LOG( i, argv[1] );
-            return;
+            return 0;
         }
     }
 
     UT_shlf("Unsupported log level '%s'", argv[0]);
     UT_LOG( Error, "Invalid log level '%s'; %s", argv[0], argv[1]);
+    return -1;
 }
 
 /******************************************************************************
@@ -74,17 +75,17 @@ int UT_log_bump_level (int argc, char*ar
     if (!strcmp(argv[0], "level")) {
         if (argc != 2) {
             UT_shlf("usage: log level <newlevel>");
-            return;
+            return -1;
         }
 
         UT_var_set( LOGLEVEL_VARNAME, argv[1]);
-        return;
+        return 0;
     }
 
     /* Handle "log more" or "log less" */
     if (argc != 1) {
         UT_shlf("usage:\nlog more\nlog less\n");
-        return;
+        return -1;
     }
 
     if (!strcmp("more",argv[0]) && (UT_log_global.loglevel < Debugk)) 
@@ -94,12 +95,13 @@ int UT_log_bump_level (int argc, char*ar
     else {
         UT_shlf("Log level already at %s verbosity", 
                 UT_log_global.loglevel ? "maximum" : "minimum");
-        return;
+        return -1;
     }
 
     /* Set it to its new text value, e.g. Info */
     UT_var_set( LOGLEVEL_VARNAME, UT_loglevel_strs[ new_level ] );
     UT_shlf( "Now logging at %s level", UT_loglevel_strs[UT_log_global.loglevel]);
+    return 0;
 }
 
 /******************************************************************************
@@ -114,16 +116,17 @@ int UT_log_reopen(int argc, char *argv[]
     if (argc == 1) {
         UT_var_get( LOGFILE_VARNAME, &file);
         UT_shlf("%s\n", file);
-        return;
+        return 0;
     }
 
     if (argc > 2) {
         UT_shlf("Usage: log file [newfile]");
-        return;
+        return -1;
     }
 
     /* No feedback to shl if user points log file at unopenable path */
     if (argc == 2) UT_var_set( LOGFILE_VARNAME , argv[1]);
+    return 0;
 }
 
 /******************************************************************************
@@ -168,6 +171,7 @@ int UT_log_usage(int argc,char*argv[]) {
         UT_shlf("log level <newlevel>  -- Change to specified log level\n");
         UT_shlf("log more              -- Increase logging verbosity\n");
         UT_shlf("log less              -- Decrease logging verbosity\n");
+        return SHL_OK;
 }
 
 int UT_log_init_shl() {
