code: def _addLoggingOptions(addOptionFn):
      
      ##################################################
      # BEFORE YOU ADD OR REMOVE OPTIONS TO THIS FUNCTION, KNOW THAT
      # YOU MAY ONLY USE VARIABLES ACCEPTED BY BOTH optparse AND argparse
      # FOR EXAMPLE, YOU MAY NOT USE default=%default OR default=%(default)s
      ##################################################
      addOptionFn("--logOff", dest="logOff", action="store_true", default=False,
                       help="Turn off logging. (default is CRITICAL)")
      addOptionFn(
          "--logInfo", dest="logInfo", action="store_true", default=False,
          help="Turn on logging at INFO level. (default is CRITICAL)")
      addOptionFn(
          "--logDebug", dest="logDebug", action="store_true", default=False,
          help="Turn on logging at DEBUG level. (default is CRITICAL)")
      addOptionFn(
          "--logLevel", dest="logLevel", default='CRITICAL',
          help=("Log at level (may be either OFF/INFO/DEBUG/CRITICAL). "
                "(default is CRITICAL)"))
      addOptionFn("--logFile", dest="logFile", help="File to log in")
      addOptionFn(
          "--rotatingLogging", dest="logRotating", action="store_true",
          default=False, help=("Turn on rotating logging, which prevents log "
                               "files getting too big."))
docs: Adds logging options