Added logging function

Added the function to shell out to logger and do the actual logging