Function setLogLevel