Logger: now levels are configurable, cleaner code