Added logging methods with setting to determine loglevel