use global variable to store log level in C . #141