_log module

class pyflyby._log.PyflybyLogger(name, level)
_LEVELS: Dict[str, int] = {'DEBUG': 10, 'ERROR': 40, 'INFO': 20, 'WARNING': 30}
property debug_enabled: bool
property info_enabled: bool
set_level(level)

Set the pyflyby logger’s level to level.

Return type:

None

class pyflyby._log._PyflybyFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)
_ANSI_RESET = '\x1b[0m'
_COLORS: Dict[str, str] = {'blue': '\x1b[34m', 'red': '\x1b[31m', 'yellow': '\x1b[33m'}
_color_for_level(levelno)
Return type:

str

formatInteractive(record)
Return type:

str

formatPlain(record)
Return type:

str

class pyflyby._log._PyflybyHandler
_logged_anything_during_context = False
_pre_log_function = None
emit(record)

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

Return type:

None

pyflyby._log._is_interactive(file)
Return type:

bool

pyflyby._log._is_ipython()

Returns true if we’re currently running inside IPython.

Return type:

bool