dhcpkit.common.server.logging.config_datatypes module

Datatypes useful for the logging component

dhcpkit.common.server.logging.config_datatypes.logging_level(value: str) → int[source]

Convert the strings representing logging levels to their numerical value

Parameters:value – The string representing the logging level
Returns:Numerical logging level
dhcpkit.common.server.logging.config_datatypes.rotation_style(value: str) → str[source]

Determine the rotation style.

Parameters:value – String representation of rotation style
Returns:Normalised rotation style
dhcpkit.common.server.logging.config_datatypes.syslog_facility(value: str) → int[source]

Convert the strings representing syslog facilities to their numerical value

Parameters:value – The string representing the syslog facility
Returns:Numerical syslog facility
dhcpkit.common.server.logging.config_datatypes.udp_or_tcp(value: str) → int[source]

Convert the strings “udp” and “tcp” to SOCK_DGRAM and SOCK_STREAM respectively

Parameters:value – The string “udp” or “tcp”
Returns:SOCK_DGRAM or SOCK_STREAM