Logger

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

Logger for the Builder, ICudaEngine and Runtime . Derives from ILogger .

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

Members:

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

Logs a message to stderr .

Parameters:
  • 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.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