Changed logger

Using only log level (1,2 or 3) to determine if the logger is ON or OFF