#!/usr/bin/python
"""
common.py
"""

import sys


def log(msg, *args):
  if args:
    msg = msg % args
  print >>sys.stderr, 'webpipe:', msg



"""
util.py
"""

import os
import sys

basename = os.path.basename(sys.argv[0])
prefix, _ = os.path.splitext(basename)

def log(msg, *args):
  if args:
    msg = msg % args
  print >>sys.stderr, prefix + ': ' + msg


Use the program name as the prefix.
Use the program name as the prefix.
