private IDetailedLogger GetLoggerForFile(string logPath) { if (logPath.EndsWith(".xml", StringComparison.OrdinalIgnoreCase)) { return new XmlLogger(logPath, _analytics); } else { return new StructuredTextLogger(logPath, _analytics); } }