mutex locked logging