simple implementation of log (demo)