new_contents: import logging
  
  
  def log(func):
      """
      Put to log which function has been called
      """
  
      def wrap_log(*args, **kwargs):
          name = func.__name__
          logger = logging.getLogger(name)
          logger.setLevel(logging.INFO)
  
          # Logfile
          fh = logging.FileHandler("%s.log" % name)
          fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
          formatter = logging.Formatter(fmt)
          fh.setFormatter(formatter)
          logger.addHandler(fh)
  
          logger.info("Call fnction: %s" % name)
          result = func(*args, **kwargs)
          logger.info("Result: %s" % result)
          return func
  
      return wrap_log
  
  
  @log
  def double_function(a):
      """
      Multiply parameter
      """
      return a * 2
  
  
  if __name__ == "__main__":
      double_function(2)
  
subject: Create log_decorator.py