code: def syslog_generate(str_processName, str_pid):
        '''
        Returns a string similar to:
  
              Tue Oct  9 10:49:53 2012 pretoria message.py[26873]:
  
        where 'pretoria' is the hostname, 'message.py' is the current process
        name and 26873 is the current process id.
        '''
        localtime = time.asctime( time.localtime(time.time()) )      
        hostname = os.uname()[1]
        syslog = '%s %s %s[%s]' % (localtime, hostname, str_processName, str_pid)
        return syslof syslog_generate(str_processName, str_pid):
        '''
        Returns a string similar to:
  
              Tue Oct  9 10:49:53 2012 pretoria message.py[26873]:
  
        where 'pretoria' is the hostname, 'message.py' is the current process
        name and 26873 is the current process id.
        '''
        localtime = time.asctime( time.localtime(time.time()) )      
        hostname = os.uname()[1]
        syslog = '%s %s %s[%s]' % (localtime, hostname, str_processName, str_pid)
        return syslog
docs: Returns a string similar to:
  
              Tue Oct  9 10:49:53 2012 pretoria message.py[26873]:
  
        where 'pretoria' is the hostname, 'message.py' is the current process
        name and 26873 is the current process id.