add loglevel

bug in logging solved