Fix error about sqlite thread access. fix #2352
Add -L and -l short options for --loglevel and --logfile refs #2359