+def _check_log_level(log_level):
+ _check_int(log_level)
+
+ log_levels = (
+ bt2_logging.LoggingLevel.TRACE,
+ bt2_logging.LoggingLevel.DEBUG,
+ bt2_logging.LoggingLevel.INFO,
+ bt2_logging.LoggingLevel.WARNING,
+ bt2_logging.LoggingLevel.ERROR,
+ bt2_logging.LoggingLevel.FATAL,
+ bt2_logging.LoggingLevel.NONE,
+ )
+
+ if log_level not in log_levels:
+ raise ValueError("'{}' is not a valid logging level".format(log_level))
+