Make logging level based