You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
818 B

  1. #! /usr/bin/env python
  2. """WSDL parsing services package for Web Services for Python."""
  3. ident = "$Id$"
  4. import WSDLTools
  5. import XMLname
  6. from logging import getLogger as _getLogger
  7. import logging.config as _config
  8. LOGGING = 'logging.txt'
  9. DEBUG = True
  10. #
  11. # If LOGGING configuration file is not found, turn off logging
  12. # and use _noLogger class because logging module's performance
  13. # is terrible.
  14. #
  15. try:
  16. _config.fileConfig(LOGGING)
  17. except:
  18. DEBUG = False
  19. class Base:
  20. def __init__(self, module=__name__):
  21. self.logger = _noLogger()
  22. if DEBUG is True:
  23. self.logger = _getLogger('%s-%s(%x)' %(module, self.__class__, id(self)))
  24. class _noLogger:
  25. def __init__(self, *args): pass
  26. def warning(self, *args): pass
  27. def debug(self, *args): pass
  28. def error(self, *args): pass