Skip to content

Instantly share code, notes, and snippets.

@slashdoom
Last active August 29, 2015 14:18
Show Gist options
  • Save slashdoom/717e2430986aab04712e to your computer and use it in GitHub Desktop.
Save slashdoom/717e2430986aab04712e to your computer and use it in GitHub Desktop.
Template for Python based external syslog-ng log parser
#!/usr/bin/env python
import sys
PYTHONUNBUFFERED = "true"
try:
for line in sys.stdin:
# do stuff with line
except Exception as err:
# error reporting on err
exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment