Fully-functional log module using syslog.
Usage:
python
import log
logger = log.Log()
log.debug("message")
log.warning("message")
log.error("message")
try:
something()
except Exception:
log.stackTrace("uncaught exception")
Exception output example:
python log.py
tail /var/log/messages
log.py: Exception <type 'exceptions.ZeroDivisionError'>: 'integer division or modulo by zero' (2 stack frames following, innermost [0])
log.py: [0] log.py, test(y=5) at line 252: x = y / 0
log.py: [1] log.py, <module>() at line 255: test(5)