class_docstr: Configure logging using a dictionary-like object to describe the
  configuration.
class_docstr_tok: ["Configure","logging","using","a","dictionary-like","object","to","describe","the","configuration","."]
docstr: Configure a formatter from a dictionary.
code: def configure_formatter(self, config):
      """Configure a formatter from a dictionary."""
      if "()" in config:
          factory = config["()"]  # for use in exception handler
          try:
              result = self.configure_custom(config)
          except TypeError as te:
              if "'format'" not in str(te):
                  raise
              # Name of parameter changed from fmt to format.
              # Retry with old name.
              # This is so that code can be used with older Python versions
              # (e.g. by Django)
              config["fmt"] = config.pop("format")
              config["()"] = factory
              result = self.configure_custom(config)
      else:
          fmt = config.get("format", None)
          dfmt = config.get("datefmt", None)
          result = logging.Formatter(fmt, dfmt)
      return result
  
imports: import cStringIO
  import errno
  import io
  import logging
  import logging.handlers
  import os
  import re
  import socket
  import struct
  import sys
  import traceback
  import types
  from SocketServer import ThreadingTCPServer, StreamRequestHandler
label_desc: Use image node_id 2 for calling the DictConfigurator obj's underlying member method code with example usage: obj.configure_formatter(config) and returns: result