TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
polygraphy.logger.logger.Logger Class Reference
Inheritance diagram for polygraphy.logger.logger.Logger:
Collaboration diagram for polygraphy.logger.logger.Logger:

Public Member Functions

def __init__ (self, severity=INFO, colors=True, letter=True, timestamp=False, line_info=False, exit_on_errors=False)
 
def severity (self)
 
def severity (self, value)
 
def register_callback (self, callback)
 
def indent (self, level=1)
 
def verbosity (self, severity=CRITICAL)
 
def log (self, message, severity, mode=LogMode.EACH, stack_depth=2)
 
def ultra_verbose (self, message, mode=LogMode.EACH)
 
def super_verbose (self, message, mode=LogMode.EACH)
 
def extra_verbose (self, message, mode=LogMode.EACH)
 
def verbose (self, message, mode=LogMode.EACH)
 
def info (self, message, mode=LogMode.EACH)
 
def start (self, message, mode=LogMode.EACH)
 
def finish (self, message, mode=LogMode.EACH)
 
def warning (self, message, mode=LogMode.EACH)
 
def error (self, message, mode=LogMode.EACH)
 
def critical (self, message)
 

Public Attributes

 logging_indent
 
 root_dir
 
 once_logged
 
 colors
 
 letter
 
 timestamp
 
 line_info
 
 exit_on_errors
 
 logger_callbacks
 

Static Public Attributes

int ULTRA_VERBOSE = -20
 
int SUPER_VERBOSE = -10
 
int EXTRA_VERBOSE = 0
 
int VERBOSE = 10
 
int INFO = 20
 
int START = 22
 
int FINISH = 28
 
int WARNING = 30
 
int ERROR = 40
 
int CRITICAL = 50
 
dictionary SEVERITY_LETTER_MAPPING
 
dictionary SEVERITY_COLOR_MAPPING
 

Private Attributes

 _severity
 

Constructor & Destructor Documentation

◆ __init__()

def polygraphy.logger.logger.Logger.__init__ (   self,
  severity = INFO,
  colors = True,
  letter = True,
  timestamp = False,
  line_info = False,
  exit_on_errors = False 
)
Logger.

Args:
    severity (Logger.Severity): Messages below this severity are ignored.
    colors (bool): Whether to use colored output.
    letter (bool): Whether to prepend each logging message with a letter indicating it's severity. Defaults to True.
    timestamp (bool): Whether to include a timestamp in the logging output. Defaults to False.
    line_info (bool): Whether to include file and line number information in the logging output. Defaults to False.

Member Function Documentation

◆ severity() [1/2]

def polygraphy.logger.logger.Logger.severity (   self)
Here is the caller graph for this function:

◆ severity() [2/2]

def polygraphy.logger.logger.Logger.severity (   self,
  value 
)
Here is the call graph for this function:

◆ register_callback()

def polygraphy.logger.logger.Logger.register_callback (   self,
  callback 
)
Registers a callback with the logger, which will be invoked when the logging severity is modified.
The callback is guaranteed to be called at least once in the register_callback function.

Args:
    callback (Callable(Logger.Severity)): A callback that accepts the current logger severity.

◆ indent()

def polygraphy.logger.logger.Logger.indent (   self,
  level = 1 
)
Returns a context manager that indents all strings logged by the specified amount.

◆ verbosity()

def polygraphy.logger.logger.Logger.verbosity (   self,
  severity = CRITICAL 
)
Returns a context manager that temporarily changes the severity of the logger for its duration.

Args:
    severity (Logger.Severity):
    The severity to set the logger to. Defaults to Logger.CRITICAL, which will suppress all messages.

◆ log()

def polygraphy.logger.logger.Logger.log (   self,
  message,
  severity,
  mode = LogMode.EACH,
  stack_depth = 2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ultra_verbose()

def polygraphy.logger.logger.Logger.ultra_verbose (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ super_verbose()

def polygraphy.logger.logger.Logger.super_verbose (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ extra_verbose()

def polygraphy.logger.logger.Logger.extra_verbose (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ verbose()

def polygraphy.logger.logger.Logger.verbose (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ info()

def polygraphy.logger.logger.Logger.info (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ start()

def polygraphy.logger.logger.Logger.start (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ finish()

def polygraphy.logger.logger.Logger.finish (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ warning()

def polygraphy.logger.logger.Logger.warning (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ error()

def polygraphy.logger.logger.Logger.error (   self,
  message,
  mode = LogMode.EACH 
)
Here is the call graph for this function:

◆ critical()

def polygraphy.logger.logger.Logger.critical (   self,
  message 
)
Here is the call graph for this function:

Member Data Documentation

◆ ULTRA_VERBOSE

int polygraphy.logger.logger.Logger.ULTRA_VERBOSE = -20
static

◆ SUPER_VERBOSE

int polygraphy.logger.logger.Logger.SUPER_VERBOSE = -10
static

◆ EXTRA_VERBOSE

int polygraphy.logger.logger.Logger.EXTRA_VERBOSE = 0
static

◆ VERBOSE

int polygraphy.logger.logger.Logger.VERBOSE = 10
static

◆ INFO

int polygraphy.logger.logger.Logger.INFO = 20
static

◆ START

int polygraphy.logger.logger.Logger.START = 22
static

◆ FINISH

int polygraphy.logger.logger.Logger.FINISH = 28
static

◆ WARNING

int polygraphy.logger.logger.Logger.WARNING = 30
static

◆ ERROR

int polygraphy.logger.logger.Logger.ERROR = 40
static

◆ CRITICAL

int polygraphy.logger.logger.Logger.CRITICAL = 50
static

◆ SEVERITY_LETTER_MAPPING

dictionary polygraphy.logger.logger.Logger.SEVERITY_LETTER_MAPPING
static
Initial value:
= {
ULTRA_VERBOSE: "[U]",
SUPER_VERBOSE: "[S]",
EXTRA_VERBOSE: "[X]",
VERBOSE: "[V]",
INFO: "[I]",
START: "[I]",
FINISH: "[D]",
WARNING: "[W]",
ERROR: "[E]",
CRITICAL: "[!]",
}

◆ SEVERITY_COLOR_MAPPING

dictionary polygraphy.logger.logger.Logger.SEVERITY_COLOR_MAPPING
static
Initial value:
= {
ULTRA_VERBOSE: "dark_green",
SUPER_VERBOSE: "green",
EXTRA_VERBOSE: "cyan",
VERBOSE: "dark_gray",
INFO: None,
START: "light_blue",
FINISH: "light_green",
WARNING: "light_yellow",
ERROR: "light_red",
CRITICAL: "light_red",
}

◆ _severity

polygraphy.logger.logger.Logger._severity
private

◆ logging_indent

polygraphy.logger.logger.Logger.logging_indent

◆ root_dir

polygraphy.logger.logger.Logger.root_dir

◆ once_logged

polygraphy.logger.logger.Logger.once_logged

◆ colors

polygraphy.logger.logger.Logger.colors

◆ letter

polygraphy.logger.logger.Logger.letter

◆ timestamp

polygraphy.logger.logger.Logger.timestamp

◆ line_info

polygraphy.logger.logger.Logger.line_info

◆ exit_on_errors

polygraphy.logger.logger.Logger.exit_on_errors

◆ logger_callbacks

polygraphy.logger.logger.Logger.logger_callbacks

The documentation for this class was generated from the following file: