change function name and fix bug under windos

the bug is log information has the same colour on Windos Platform