updated logger object to accept levels