old_contents: """
      twtxt.log
      ~~~~~~~~~
  
      This module configures the logging module for twtxt.
  
      :copyright: (c) 2016 by buckket.
      :license: MIT, see LICENSE for more details.
  """
  
  import logging
  
  
  def init_logging(debug=False):
      logger = logging.getLogger()
  
      formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
  
      ch = logging.StreamHandler()
      ch.setLevel(logging.DEBUG)
      ch.setFormatter(formatter)
      logger.addHandler(ch)
  
      if debug:
          logger.setLevel(logging.DEBUG)
  
new_contents: """
      twtxt.log
      ~~~~~~~~~
  
      This module configures the logging module for twtxt.
  
      :copyright: (c) 2016 by buckket.
      :license: MIT, see LICENSE for more details.
  """
  
  import logging
  
  
  def init_logging(debug=False):
      logger = logging.getLogger()
  
      formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
  
      ch = logging.StreamHandler()
      ch.setLevel(logging.DEBUG)
      ch.setFormatter(formatter)
      logger.addHandler(ch)
  
      if debug:
          logger.setLevel(logging.DEBUG)
      else:
          logger.setLevel(logging.CRITICAL)
  
subject: Set log level to CRITICAL when not in verbose mode. Reason: We catch the important errors anyway.