class tensorrt.Logger(self: tensorrt.tensorrt.Logger, min_severity: tensorrt.tensorrt.Logger.Severity = Severity.WARNING) → None

Logger for the Builder, ICudaEngine and Runtime .

Parameters:min_severity – The initial minimum severity of this Logger.
Variables:min_severityLogger.Severity This minimum required severity of messages for the logger to log them.

Note that although a logger is passed on creation to each instance of a Builder or Runtime interface, the logger is internally considered a singleton, and thus multiple instances of Runtime and/or Builder must all use the same logger.

class Severity(self: tensorrt.tensorrt.Logger.Severity, arg0: int) → None


Represents an internal error. Execution is unrecoverable.
Represents an application error.
Represents an application error that TensorRT has recovered from or fallen back to a default.
Represents informational messages.
Verbose messages with debugging information.
log(self: tensorrt.tensorrt.Logger, severity: tensorrt.tensorrt.Logger.Severity, msg: str) → None

Logs a message to stderr .

  • severity – The severity of the message.
  • msg – The log message.

Derived classes should generally overload this function.

It is also possible to access the Severity Enum values directly in the Logger scope.

  • tensorrt.Logger.VERBOSE corresponds to tensorrt.Logger.Severity.VERBOSE
  • tensorrt.Logger.INFO corresponds to tensorrt.Logger.Severity.INFO
  • tensorrt.Logger.WARNING corresponds to tensorrt.Logger.Severity.WARNING
  • tensorrt.Logger.ERROR corresponds to tensorrt.Logger.Severity.ERROR
  • tensorrt.Logger.INTERNAL_ERROR corresponds to tensorrt.Logger.Severity.INTERNAL_ERROR