Source

pyohio_talk / pysp / generate_logs.py

import syslog
import sys, time, random

syslog.openlog('test-splunk', syslog.LOG_PID, syslog.LOG_LOCAL2)


if __name__ == '__main__':

    while True:
        try:
            syslog.syslog("%s-%f" % (sys.argv[1], random.random()))
        except KeyboardInterrupt:
            sys.exit()
        time.sleep(1)