use a CSingleLock for avlog, flush log and the lock manager callback.