logger

Logging utilities.

class aws_stepfunction.logger.BaseLogger(name=None, **kwargs)[source]

A base class for logger constructor.

remove_all_handler()[source]

Unlink the file handler association.

recover_all_handler()[source]

Relink the file handler association you just removed.

decorator(func)[source]

A decorator that allow you to use verbose parameter to temporarily disable logging in the given function. (default is enabled)

Example:

@logger.decorator
def my_func(name):
    logger.info(f"hello {name}!")

my_func("alice") # this will print "hello alice"
my_func("alice", verbose=False) # this will print nothing
class aws_stepfunction.logger.StreamOnlyLogger(name=None, stream_level=20, stream_format='%(message)s')[source]

This logger only print message to console, and not write log to file.

Parameters
  • stream_level – level above this will be streamed.

  • stream_format – log information format.