public IEnumerable <LogEntry> GetLogEntries(string id) { ITracer tracer = _traceFactory.GetTracer(); using (tracer.Step("DeploymentManager.GetLogEntries(id)")) { string path = GetLogPath(id, ensureDirectory: false); if (!_fileSystem.File.Exists(path)) { throw new FileNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.Error_NoLogFound, id)); } VerifyDeployment(id); var logger = new XmlLogger(_fileSystem, path); List <LogEntry> entries = logger.GetLogEntries().ToList(); // Determine if there's details to show at all foreach (var e in entries) { e.HasDetails = logger.GetLogEntryDetails(e.Id).Any(); } return(entries); } }
public IEnumerable <LogEntry> GetLogEntryDetails(string id, string entryId) { ITracer tracer = _traceFactory.GetTracer(); using (tracer.Step("DeploymentManager.GetLogEntryDetails(id, entryId)")) { string path = GetLogPath(id, ensureDirectory: false); if (!_fileSystem.File.Exists(path)) { throw new FileNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.Error_NoLogFound, id)); } VerifyDeployment(id); var logger = new XmlLogger(_fileSystem, path); return(logger.GetLogEntryDetails(entryId).ToList()); } }
public IEnumerable<LogEntry> GetLogEntryDetails(string id, string entryId) { ITracer tracer = _traceFactory.GetTracer(); using (tracer.Step("DeploymentManager.GetLogEntryDetails(id, entryId)")) { string path = GetLogPath(id, ensureDirectory: false); if (!_fileSystem.File.Exists(path)) { throw new FileNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.Error_NoLogFound, id)); } VerifyDeployment(id); var logger = new XmlLogger(_fileSystem, path); return logger.GetLogEntryDetails(entryId).ToList(); } }
public IEnumerable<LogEntry> GetLogEntries(string id) { ITracer tracer = _traceFactory.GetTracer(); using (tracer.Step("DeploymentManager.GetLogEntries(id)")) { string path = GetLogPath(id, ensureDirectory: false); if (!_fileSystem.File.Exists(path)) { throw new FileNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.Error_NoLogFound, id)); } VerifyDeployment(id); var logger = new XmlLogger(_fileSystem, path); List<LogEntry> entries = logger.GetLogEntries().ToList(); // Determine if there's details to show at all foreach (var e in entries) { e.HasDetails = logger.GetLogEntryDetails(e.Id).Any(); } return entries; } }