Add two log operation utilities and incomplete tests.