[utils] add log level setting function