[log] add an internal logger instead of using redirected stderr