diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-10-16 16:49:54 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-10-17 12:01:40 -0400 |
commit | d97d7f0e48495e0b354b30b79992da822d12c15d (patch) | |
tree | 9e600d01e3052aee0ad201688f3dadf826002e60 /src/app/config/quiet_level.h | |
parent | b9f002dec6fac7276a34371e6183db0f4cd8560a (diff) | |
download | tor-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.h | 28 |
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) */ |