logging_filters

class pyrosetta.distributed.cluster.logging_filters.DefaultProtocolNameFilter

Bases: Filter

Maybe set protocol name of third-party root log records for logging socket listener formatter.

__init__() None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class pyrosetta.distributed.cluster.logging_filters.SetProtocolNameFilter(protocol_name: str)

Bases: Filter

Set protocol name for logging socket listener formatter.

__init__(protocol_name: str) None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class pyrosetta.distributed.cluster.logging_filters.DefaultSocketAddressFilter

Bases: Filter

Maybe set socket address of third-party root log records for logging socket listener formatter.

__init__() None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class pyrosetta.distributed.cluster.logging_filters.SetSocketAddressFilter(socket_listener_address: Tuple[str, int])

Bases: Filter

Set socket address for logging socket listener filter.

__init__(socket_listener_address: Tuple[str, int]) None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class pyrosetta.distributed.cluster.logging_filters.SocketAddressFilter(socket_listener_address: Tuple[str, int])

Bases: Filter

Filter log records for the logging socket listener address.

__init__(socket_listener_address: Tuple[str, int]) None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class pyrosetta.distributed.cluster.logging_filters.DefaultTaskIdFilter

Bases: Filter

Maybe set task ID of third-party root log records for logging socket listener formatter.

__init__() None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

class pyrosetta.distributed.cluster.logging_filters.SetTaskIdFilter(task_id: str)

Bases: Filter

Set task ID for logging socket listener filter.

__init__(task_id: str) None

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record: LogRecord) bool

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

pyrosetta.distributed.cluster.logging_filters.format_socket_address(socket_listener_address: Tuple[str, int]) str

Format a socket listener address for socket listener handler filters.

pyrosetta.distributed.cluster.logging_filters.split_socket_address(socket_address: str) Tuple[str, int]

Split a socket listener address for socket listener handlers.