logging.config.stopListening()

logging.config.stopListening() Stops the listening server which was created with a call to listen(). This is typically called before calling join() on the return value from listen().

logging.config.listen()

logging.config.listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None) Starts up a socket server on the specified port, and listens for new configurations. If no port is specified, the module’s default DEFAULT_LOGGING_CONFIG_PORT is used. Logging configurations will be sent as a file suitable for processing by fileConfig(). Returns a Thread instance on which you can call start() to start the server, and which you can join() when appropriate. To stop the server, call stopListening(). The verify

logging.config.fileConfig()

logging.config.fileConfig(fname, defaults=None, disable_existing_loggers=True) Reads the logging configuration from a configparser-format file. The format of the file should be as described in Configuration file format. This function can be called several times from an application, allowing an end user to select from various pre-canned configurations (if the developer provides a mechanism to present the choices and load the chosen configuration). Parameters: fname – A filename, or a file-l

logging.config.dictConfig()

logging.config.dictConfig(config) Takes the logging configuration from a dictionary. The contents of this dictionary are described in Configuration dictionary schema below. If an error is encountered during configuration, this function will raise a ValueError, TypeError, AttributeError or ImportError with a suitably descriptive message. The following is a (possibly incomplete) list of conditions which will raise an error: A level which is not a string or which is a string not corresponding t

logging.captureWarnings()

logging.captureWarnings(capture) This function is used to turn the capture of warnings by logging on and off. If capture is True, warnings issued by the warnings module will be redirected to the logging system. Specifically, a warning will be formatted using warnings.formatwarning() and the resulting string logged to a logger named 'py.warnings' with a severity of WARNING. If capture is False, the redirection of warnings to the logging system will stop, and warnings will be redirected to the

logging.basicConfig()

logging.basicConfig(**kwargs) Does basic configuration for the logging system by creating a StreamHandler with a default Formatter and adding it to the root logger. The functions debug(), info(), warning(), error() and critical() will call basicConfig() automatically if no handlers are defined for the root logger. This function does nothing if the root logger already has handlers configured for it. Note This function should be called from the main thread before other threads are started. In

logging.addLevelName()

logging.addLevelName(lvl, levelName) Associates level lvl with text levelName in an internal dictionary, which is used to map numeric levels to a textual representation, for example when a Formatter formats a message. This function can also be used to define your own levels. The only constraints are that all levels used must be registered using this function, levels should be positive integers and they should increase in increasing order of severity. Note If you are thinking of defining you

locals()

locals() Update and return a dictionary representing the current local symbol table. Free variables are returned by locals() when it is called in function blocks, but not in class blocks. Note The contents of this dictionary should not be modified; changes may not affect the values of local and free variables used by the interpreter.

locale.strxfrm()

locale.strxfrm(string) Transforms a string to one that can be used in locale-aware comparisons. For example, strxfrm(s1) < strxfrm(s2) is equivalent to strcoll(s1, s2) < 0. This function can be used when the same string is compared repeatedly, e.g. when collating a sequence of strings.

locale.strcoll()

locale.strcoll(string1, string2) Compares two strings according to the current LC_COLLATE setting. As any other compare function, returns a negative, or a positive value, or 0, depending on whether string1 collates before or after string2 or is equal to it.