summaryrefslogtreecommitdiff
path: root/src/app/config/quiet_level.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-16 16:49:54 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-17 12:01:40 -0400
commitd97d7f0e48495e0b354b30b79992da822d12c15d (patch)
tree9e600d01e3052aee0ad201688f3dadf826002e60 /src/app/config/quiet_level.h
parentb9f002dec6fac7276a34371e6183db0f4cd8560a (diff)
downloadtor-d97d7f0e48495e0b354b30b79992da822d12c15d.tar.gz
tor-d97d7f0e48495e0b354b30b79992da822d12c15d.zip
Use an enum for quiet_level.
Diffstat (limited to 'src/app/config/quiet_level.h')
-rw-r--r--src/app/config/quiet_level.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/app/config/quiet_level.h b/src/app/config/quiet_level.h
new file mode 100644
index 0000000000..e90ec3f276
--- /dev/null
+++ b/src/app/config/quiet_level.h
@@ -0,0 +1,28 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2019, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file quiet_level.h
+ * \brief Declare the quiet_level enumeration and global.
+ **/
+
+#ifndef QUIET_LEVEL_H
+#define QUIET_LEVEL_H
+
+/** Enumeration to define how quietly Tor should log at startup. */
+typedef enum {
+ /** Default quiet level: we log everything of level NOTICE or higher. */
+ QUIET_NONE = 0,
+ /** "--hush" quiet level: we log everything of level WARNING or higher. */
+ QUIET_HUSH = 1 ,
+ /** "--quiet" quiet level: we log nothing at all. */
+ QUIET_SILENT = 2
+} quiet_level_t;
+
+/** How quietly should Tor log at startup? */
+extern quiet_level_t quiet_level;
+
+#endif /* !defined(QUIET_LEVEL_H) */