remove unused function
don't config log in library mode