Added option to set loglevel via env variables