add basic example for logging decorator
log decorater should accept a logging function to redirect output