feature: add buf to log
demo: add demo for buf write in log