The Gaudi Framework  master (76fc3702)
Loading...
Searching...
No Matches
Constants.py
Go to the documentation of this file.
13"""Useful/conventional constants."""
14
15from enum import IntEnum, unique
16
17__all__ = [
18 "MessageLevel",
19 "NIL",
20 "ALL",
21 "VERBOSE",
22 "DEBUG",
23 "INFO",
24 "WARNING",
25 "ERROR",
26 "FATAL",
27 "ALWAYS",
28 "TRUE",
29 "FALSE",
30]
31
32
33@unique
34class MessageLevel(IntEnum):
35 """Message severity and output-threshold levels matching ``MSG::Level``."""
36
37 NIL = 0
38 VERBOSE = 1
39 DEBUG = 2
40 INFO = 3
41 WARNING = 4
42 ERROR = 5
43 FATAL = 6
44 ALWAYS = 7
45
46
47# message levels -----------------------------------------------------------
48NIL = MessageLevel.NIL.value
49ALL = NIL
50VERBOSE = MessageLevel.VERBOSE.value
51DEBUG = MessageLevel.DEBUG.value
52INFO = MessageLevel.INFO.value
53WARNING = MessageLevel.WARNING.value
54ERROR = MessageLevel.ERROR.value
55FATAL = MessageLevel.FATAL.value
56ALWAYS = MessageLevel.ALWAYS.value
57
58# for job options legacy (TODO: get rid of these!) -------------------------
59TRUE = True
60FALSE = False
61
62# message to notify folks that they really have to fix their codes:
63error_explanation = """
64 ==> After this line, a hack will be executed, attempting to rectify the
65 ==> problem just reported. Since this hack may fail, and since it is a
66 ==> rather temporary measure hack, this is an ERROR, not a WARNING."""