title: Python Logger object is not callable
body: <p>I'm trying to write a module to use it in different scripts</p>
  
  <pre><code>import logging
  from logging.handlers import RotatingFileHandler
  
  
  _logger_name = "Nagios"
  _print_format = "%(asctime)s - %(levelname)s - %(message)s"
  _level = logging.DEBUG
  
  class Log():
  
  
      def __init__(self,log_file,logger_name=_logger_name,level=_level):
          self.log_file = log_file
          self.logger_name = logger_name
          self.level = level
  
      def getLog(self):
  
          """
          Return the logging object
  
          """
         _logger = logging.getLogger(self.logger_name)
         _logger.setLevel(self.level)
         _logger.addHandler(self._rotateLog())
  
         return _logger
  
      def _rotateLog(self):
  
         """
         Rotating the log files if it exceed the size
         """
         rh = RotatingFileHandler(self.log_file,
                               maxBytes=20*1024*1024, backupCount=2)
         formatter = logging.Formatter(_print_format)
         rh.setFormatter(formatter)
         return rh
  
  log = Log("kdfnknf").getLog()
  log("hello")
  </code></pre>
  
  <p>I see the following error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "nagiosLog.py", line 45, in &lt;module&gt;
    log("hello")
  TypeError: 'Logger' object is not callable
  </code></pre>
  
  <p>Any idea why I'm getting this error, </p>
  
  <p>When debugged using pdb I do see it returns the object and printing the dir(log) I don't see the Logger module in it.</p>
  
  <p>Am I missing something here          </p>