def getVerbosityFormat(verbosity, fmt=' %(message)s'):
 if (verbosity > 1):
  if (verbosity > 3):
   fmt = (' | %(module)15.15s-%(levelno)-2d: %(funcName)-20.20s |' + fmt)
  if (verbosity > 2):
   fmt = (' +%(relativeCreated)5d %(thread)X %(name)-25.25s %(levelname)-5.5s' + fmt)
  else:
   fmt = (' %(asctime)-15s %(thread)X %(levelname)-5.5s' + fmt)
 return fmt

def getVerbosityFormat ( verbosity , fmt = ' %(message)s' ) : if ( verbosity > 1 ) : if ( verbosity > 3 ) : fmt = ( ' | %(module)15.15s-%(levelno)-2d: %(funcName)-20.20s |' + fmt ) if ( verbosity > 2 ) : fmt = ( ' +%(relativeCreated)5d %(thread)X %(name)-25.25s %(levelname)-5.5s' + fmt ) else : fmt = ( ' %(asctime)-15s %(thread)X %(levelname)-5.5s' + fmt ) return fmt
custom log format for the verbose runs .