Kudu.Core.Deployment.DeploymentManager.GetLogEntries C# (CSharp) Method

GetLogEntries() public method

public GetLogEntries ( string id ) : IEnumerable
id string
return IEnumerable
        public IEnumerable<LogEntry> GetLogEntries(string id)
        {
            ITracer tracer = _traceFactory.GetTracer();
            using (tracer.Step($"DeploymentManager.GetLogEntries(id:{id})"))
            {
                string path = GetLogPath(id, ensureDirectory: false);

                if (!FileSystemHelpers.FileExists(path))
                {
                    throw new FileNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.Error_NoLogFound, id));
                }

                VerifyDeployment(id, IsDeploying);

                var logger = GetLoggerForFile(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;
            }
        }