A simple logging utility for logging errors in my python scripts.
from log4a import createLog, log
def main():
# Pass an optional filename and file first line
createLog(openingLine="This is my new log file!", filename="mylog-file")
log("This is a test message", filename="mylog-file")
log("And another message", filename="mylog-file")
# Use the defaults
createLog()
log("This is a test message")
log("And another message")
main()I'm aware Python has its own logging module but I wanted something quick and simple.