summaryrefslogtreecommitdiff
path: root/include/mailutils/stream.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-12-06 12:25:29 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-12-06 12:25:29 +0200
commitec3fa1b18321ac99a62a00321ad6a059b6d30a27 (patch)
tree52267d75876393591c304364a3a92228dd384a47 /include/mailutils/stream.h
parent7fbb4fd0cfb723d7a130e7e50ade3742cdcbce79 (diff)
downloadmailutils-ec3fa1b18321ac99a62a00321ad6a059b6d30a27.tar.gz
mailutils-ec3fa1b18321ac99a62a00321ad6a059b6d30a27.tar.bz2
Implement severity suppression in log streams; other minor fixes.
* include/mailutils/stream.h (MU_LOGSTREAM_ADVANCE_LOCUS_LINE) (MU_LOGSTREAM_ADVANCE_LOCUS_COL): Rename to MU_IOCTL_.*. All uses updated. (MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY) (MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY_NAME): New ioctls. * include/mailutils/sys/logstream.h (_mu_log_stream)<threshold>: New member. * include/mailutils/syslog.h (mu_log_severity_threshold): New extern. * libmailutils/cfg/parser.y (_cfg_default_printer): Remove leftover static function. * libmailutils/stream/logstream.c (mu_severity_from_string) (mu_severity_to_string): New functions. (_log_write): Fix double free. Implement severity suppression. (_log_ioctl): Handle MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY. * libmu_cfg/common.c (mu_logging_param): New parameter "severity".
Diffstat (limited to 'include/mailutils/stream.h')
-rw-r--r--include/mailutils/stream.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index d46cb37b3..7a191e81e 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -111,12 +111,22 @@ enum mu_buffer_type
Arg: NULL (increment by 1)
int *
*/
-#define MU_LOGSTREAM_ADVANCE_LOCUS_LINE 24
+#define MU_IOCTL_LOGSTREAM_ADVANCE_LOCUS_LINE 24
/* Advance locus column.
Arg: NULL (increment by 1)
int *
*/
-#define MU_LOGSTREAM_ADVANCE_LOCUS_COL 25
+#define MU_IOCTL_LOGSTREAM_ADVANCE_LOCUS_COL 25
+
+ /* Suppress output of messages having severity lower than the
+ given threshold.
+ Arg: int *
+ */
+#define MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY 26
+ /* Same as above, but:
+ Arg: const char *
+ */
+#define MU_IOCTL_LOGSTREAM_SUPPRESS_SEVERITY_NAME 27
#define MU_TRANSPORT_INPUT 0
#define MU_TRANSPORT_OUTPUT 1

Return to:

Send suggestions and report system problems to the System administrator.