Add LogTool class to control whether to ouput the debug info or not.