Skip to content

Instantly share code, notes, and snippets.

@sofferm
Created July 4, 2014 07:55
Show Gist options
  • Save sofferm/84b450f10e68d0638918 to your computer and use it in GitHub Desktop.
Save sofferm/84b450f10e68d0638918 to your computer and use it in GitHub Desktop.
FME log function for Startup/Shutdown scripts
import time
def log(message):
print("%s | Python Shutdown | %s"%(time.asctime(),message))
with open(fme.logFileName,"a") as logfile:
logfile.write("%s | Python Shutdown | %s\n"%(time.asctime(),message))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment