Skip to content
Snippets Groups Projects
Commit f59ab15d authored by Andre Sailer's avatar Andre Sailer
Browse files

DDSim.Output: simplify CHOICES config

parent 4a9f6999
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,9 @@
from __future__ import absolute_import, unicode_literals
from DDSim.Helper.ConfigHelper import ConfigHelper
OUTPUT_CHOICES = (1, 2, 3, 4, 5, 6, 7, 'VERBOSE', 'DEBUG',
'INFO', 'WARNING', 'ERROR', 'FATAL', 'ALWAYS')
def outputLevelType(level):
"""Return verbosity level as integer if possible.
......@@ -36,28 +39,16 @@ class Output(ConfigHelper):
def __init__(self):
super(Output, self).__init__()
self._kernel_EXTRA = {'choices': (1, 2, 3, 4, 5, 6, 7, 'VERBOSE', 'DEBUG',
'INFO', 'WARNING', 'ERROR', 'FATAL', 'ALWAYS'),
'type': outputLevelType,
}
self._kernel_EXTRA = {'choices': OUTPUT_CHOICES, 'type': outputLevelType}
self._kernel = outputLevel('INFO')
self._part_EXTRA = {'choices': (1, 2, 3, 4, 5, 6, 7, 'VERBOSE', 'DEBUG',
'INFO', 'WARNING', 'ERROR', 'FATAL', 'ALWAYS'),
'type': outputLevelType,
}
self._part_EXTRA = {'choices': OUTPUT_CHOICES, 'type': outputLevelType}
self._part = outputLevel('INFO')
self._inputStage_EXTRA = {'choices': (1, 2, 3, 4, 5, 6, 7, 'VERBOSE', 'DEBUG',
'INFO', 'WARNING', 'ERROR', 'FATAL', 'ALWAYS'),
'type': outputLevelType,
}
self._inputStage_EXTRA = {'choices': OUTPUT_CHOICES, 'type': outputLevelType}
self._inputStage = outputLevel('INFO')
self._random_EXTRA = {'choices': (1, 2, 3, 4, 5, 6, 7, 'VERBOSE', 'DEBUG',
'INFO', 'WARNING', 'ERROR', 'FATAL', 'ALWAYS'),
'type': outputLevelType,
}
self._random_EXTRA = {'choices': OUTPUT_CHOICES, 'type': outputLevelType}
self._random = outputLevel('FATAL')
@property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment