Add log level setting function

I add a util function to create logger instance, so developer can set the logger level in one place. In my project, I just add the logger level as config option.