It turns out that "default" goes nowhere. Whereas "silent" actually shows
up in the log. So document "silent" (which we already supported) but
remove support for "default".

Also make the spacing between levels in the help more regular; it looks
weird being in columns when there's only one row!
---
 toys/android/log.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
From a8fa941c75c6581480dc9d88536c53adae221a0c Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Wed, 22 Jun 2016 15:50:51 -0700
Subject: [PATCH] Remove android/log's "default" priority.

It turns out that "default" goes nowhere. Whereas "silent" actually shows
up in the log. So document "silent" (which we already supported) but
remove support for "default".

Also make the spacing between levels in the help more regular; it looks
weird being in columns when there's only one row!
---
 toys/android/log.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/toys/android/log.c b/toys/android/log.c
index dff4287..7da37b6 100644
--- a/toys/android/log.c
+++ b/toys/android/log.c
@@ -14,7 +14,7 @@ config LOG
     Logs message to logcat.
 
     -p	use the given priority instead of INFO:
-    	d: DEBUG  e: ERROR    f: FATAL  i: INFO   v: VERBOSE  w: WARN  *: DEFAULT
+    	d: DEBUG  e: ERROR  f: FATAL  i: INFO  v: VERBOSE  w: WARN  s: SILENT
     -t	use the given tag instead of "log"
 */
 
@@ -34,11 +34,11 @@ void log_main(void)
   int i;
 
   if (TT.pri) {
-    i = stridx("defisvw*", tolower(*TT.pri));
+    i = stridx("defisvw", tolower(*TT.pri));
     if (i==-1 || strlen(TT.pri)!=1) error_exit("bad -p '%s'", TT.pri);
     pri = (android_LogPriority []){ANDROID_LOG_DEBUG, ANDROID_LOG_ERROR,
       ANDROID_LOG_FATAL, ANDROID_LOG_INFO, ANDROID_LOG_SILENT,
-      ANDROID_LOG_VERBOSE, ANDROID_LOG_WARN, ANDROID_LOG_DEFAULT}[i];
+      ANDROID_LOG_VERBOSE, ANDROID_LOG_WARN}[i];
   }
   if (!TT.tag) TT.tag = "log";
 
-- 
2.8.0.rc3.226.g39d4020

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to