* libamu/xutil.c (xlog_opt): define new pseudo log_option named
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 15 Aug 2005 01:54:49 +0000 (01:54 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 15 Aug 2005 01:54:49 +0000 (01:54 +0000)
"defaults", which is an alias for "fatal,error,user,warning,info".

* scripts/amd.conf.5, doc/am-utils.texi, amd/amd.8: document new
log_option "defaults".

* amq/amq.8: typo.  Arg name for -D is "debug_options" not
"log_options".

ChangeLog
NEWS
amd/amd.8
amq/amq.8
doc/am-utils.texi
include/am_utils.h
libamu/xutil.c
scripts/amd.conf.5

index a9dbd3982fb76f1d7cb20680d0e4e837b91c73d0..4065f1d0ea1042a0c9fd441e7698698a075be06c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2005-08-14  Erez Zadok  <ezk@cs.sunysb.edu>
 
+       * libamu/xutil.c (xlog_opt): define new pseudo log_option named
+       "defaults", which is an alias for "fatal,error,user,warning,info".
+
+       * scripts/amd.conf.5, doc/am-utils.texi, amd/amd.8: document new
+       log_option "defaults".
+
+       * amq/amq.8: typo.  Arg name for -D is "debug_options" not
+       "log_options".
+
        * libamu/xutil.c: make xlog_level static, and initialize it to
        XLOG_DEFAULT.
        (cmdoption): take unsigned int as flags argument, and print any
diff --git a/NEWS b/NEWS
index 19485110a2cce8e987614807845ed6562fff3d5d..a02b2d9027527373369b0c95417116cdac7c625d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,10 @@ remain small, but they are important to keep on, so Amd can report serious
 problems (including errors relating to incorrectly setting other log
 options).
 
+Amd now understands a new log_option called "defaults" which is synonymous
+with "fatal,error,user,warning,info" (and is also what logging happens by
+default).
+
 *** Notes specific to am-utils version 6.1.1
 
 New amd.conf global parameter: forced_unmounts (default to "no").  If set to
index dd5f6b96e841be01504ce8c69e17496089848409..84d70fe6dd26caa34185f355405213b56befc129 100644 (file)
--- a/amd/amd.8
+++ b/amd/amd.8
@@ -236,8 +236,8 @@ The default is 2 minutes.
 .TP
 .BI \-x " options"
 Specify run-time logging options.  The options are a comma separated
-list chosen from: fatal, error, user, warn, info, map, stats, all.
-Note that "fatal" and "error" are mandatory and cannot be turned off.
+list chosen from: fatal, error, user, warn, info, map, stats, defaults, and
+all.  Note that "fatal" and "error" are mandatory and cannot be turned off.
 
 .TP
 .BI \-y " domain"
index 84fee9a1c812795de7487031beb18e1d24abd12a..494fbcf68c6e6cc71f796bf5b76c5bed13e83c53 100644 (file)
--- a/amq/amq.8
+++ b/amq/amq.8
@@ -155,7 +155,7 @@ from now on.  Note that the "fatal" and "error" options cannot be turned
 off.
 
 .TP
-.BI \-D " log_options"
+.BI \-D " debug_options"
 Ask the automounter to use the debugging options specified in
 .I debug_options
 from now on.
index b2428b356d3657018f3a5f4788307924a15d0545..73e727703ec8fa06d0bbcab4335967090959c17b 100644 (file)
@@ -2829,10 +2829,15 @@ Mount map usage
 Additional statistics
 @item all
 All of the above
+@item defaults
+An alias for "fatal,error,user,warning,info".
 @end table
 
 Initially a set of default logging flags is enabled.  This is as if
-@samp{-x all,nomap,nostats} had been selected.  The command line is
+@samp{-x defaults}
+or
+@samp{-x fatal,error,user,warning,info}
+had been selected.  The command line is
 parsed and logging is controlled by the @code{-x} option.  The very first
 set of logging flags is saved and can not be subsequently disabled using
 @i{Amq}.  This default set of options is useful for general production
@@ -2865,7 +2870,6 @@ of the message types.@refill
 @samp{LOG_INFO}
 @end table
 
-
 The options can be prefixed by the string @samp{no} to indicate
 that this option should be turned off.  For example, to obtain all
 but @samp{info} messages the option @samp{-x all,noinfo} would be used.
@@ -4653,7 +4657,7 @@ is generally a bad idea to use those reserved for other services such as
 @subsection @t{log_options} Parameter
 @cindex log_options Parameter
 
-(type=string, default fatal+error+user+warning+info).  Same as the @code{-x}
+(type=string, default=``defaults'').  Same as the @code{-x}
 option to @i{Amd}.  Specify any logging options for @i{Amd}.  Options
 are comma delimited, and can be preceded by the string @samp{no} to
 negate their meaning.  The @samp{debug} logging option is only available
@@ -4664,6 +4668,8 @@ values are:
 @table @samp
 @item all
 all messages
+@item defaults
+an alias for "fatal,error,user,warning,info"
 @item debug
 debug messages
 @item error
index a5bab285b4073615557b895a4889998f3a658095..6d06244e78d9e7ed147bdb9c9bafea443338ab13 100644 (file)
 #define        XLOG_DEBUG      0x0020
 #define        XLOG_MAP        0x0040
 #define        XLOG_STATS      0x0080
+/* log option compositions */
 #define XLOG_MASK      0x00ff  /* mask for all flags */
 #define XLOG_MANDATORY (XLOG_FATAL|XLOG_ERROR) /* cannot turn these off */
 #define XLOG_ALL       (XLOG_FATAL|XLOG_ERROR|XLOG_USER|XLOG_WARNING|XLOG_INFO|XLOG_MAP|XLOG_STATS)
index 4cd39ddc6e185bb96a26a7a088069607c717b74d..f28d09e3c6329b96143ed849afe2efd6d0100dc3 100644 (file)
@@ -116,6 +116,7 @@ struct opt_tab dbg_opt[] =
 struct opt_tab xlog_opt[] =
 {
   {"all", XLOG_ALL},           /* All messages */
+  {"defaults", XLOG_DEFAULT},  /* Default messages */
 #ifdef DEBUG
   {"debug", XLOG_DEBUG},       /* Debug messages */
 #endif /* DEBUG */             /* DEBUG */
index 8b1bfc6a1c766c359534fb16012dc1008caaa24f..53568ca6327e7fcba94ca9513f364f684ae9e09f 100644 (file)
@@ -409,7 +409,7 @@ then Amd will log messages via
 using the LOG_LOCAL7 facility (if it exists on the system).
 
 .TP
-.BR log_options " (string, default=fatal+error+user+warning+info)"
+.BR log_options " (string, default=defaults)"
 Same as the
 .B \-x
 option to Amd.  Specify any logging options for Amd.  Options are comma
@@ -423,6 +423,7 @@ Possible values are:
 
 .nf
 \fBall\fR       all messages
+\fBdefaults\fR  default messages (fatal,error,user,warning,info)
 \fBdebug\fR     debug messages
 \fBerror\fR     non-fatal system errors (cannot be turned off)
 \fBfatal\fR     fatal errors (cannot be turned off)