Rosetta
Public Member Functions | Public Attributes | List of all members
pyrosetta.distributed.utility.log.LoggingContext Class Reference
Inheritance diagram for pyrosetta.distributed.utility.log.LoggingContext:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, logger, level=None, handler=None, close=True)
 
def __enter__ (self)
 
def __exit__ (self, et, ev, tb)
 

Public Attributes

 logger
 
 level
 
 handler
 
 close
 
 old_level
 

Detailed Description

Context handler to modify logging configuration with context.

Example:
    with LoggingContext(rosetta.logger, level=logging.WARNING):
        #...very chatty functions...

    # Back to normal logging

Constructor & Destructor Documentation

◆ __init__()

def pyrosetta.distributed.utility.log.LoggingContext.__init__ (   self,
  logger,
  level = None,
  handler = None,
  close = True 
)

Member Function Documentation

◆ __enter__()

def pyrosetta.distributed.utility.log.LoggingContext.__enter__ (   self)

◆ __exit__()

def pyrosetta.distributed.utility.log.LoggingContext.__exit__ (   self,
  et,
  ev,
  tb 
)

Member Data Documentation

◆ close

pyrosetta.distributed.utility.log.LoggingContext.close

◆ handler

pyrosetta.distributed.utility.log.LoggingContext.handler

◆ level

pyrosetta.distributed.utility.log.LoggingContext.level

◆ logger

pyrosetta.distributed.utility.log.LoggingContext.logger

◆ old_level

pyrosetta.distributed.utility.log.LoggingContext.old_level

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