+DAEMONS_LOGFILES = \
+ dict((daemon, pathutils.GetLogFilename(DAEMONS_LOGBASE[daemon]))
+ for daemon in DAEMONS_LOGBASE)
+
+# Some daemons might require more than one logfile.
+# Specifically, right now only the Haskell http library "snap", used by the
+# monitoring daemon, requires multiple log files.
+
+# These are the only valid reasons for having an extra logfile
+EXTRA_LOGREASON_ACCESS = "access"
+EXTRA_LOGREASON_ERROR = "error"
+
+VALID_EXTRA_LOGREASONS = compat.UniqueFrozenset([
+ EXTRA_LOGREASON_ACCESS,
+ EXTRA_LOGREASON_ERROR,
+ ])
+
+# These are the extra logfiles, grouped by daemon
+DAEMONS_EXTRA_LOGBASE = {
+ MOND: {
+ EXTRA_LOGREASON_ACCESS: "monitoring-daemon-access",
+ EXTRA_LOGREASON_ERROR: "monitoring-daemon-error",
+ }
+ }
+
+DAEMONS_EXTRA_LOGFILES = \
+ dict((daemon, dict((extra,
+ pathutils.GetLogFilename(DAEMONS_EXTRA_LOGBASE[daemon][extra]))
+ for extra in DAEMONS_EXTRA_LOGBASE[daemon]))
+ for daemon in DAEMONS_EXTRA_LOGBASE)
+