logger.lock -> wlock
don't allow to set format, timeformat, and sync

please define it when creating the logger. this avoids concurrency issues,
otherwise we have to use lock, which slows down the logger.
update example and test
fix destroy bug
clean up
delete setname
reorder getter and setter functions, delete addwriter