private TreeNodeCollection PopulateTreeNodes(string parentId, FormDataCollection qs) { TreeNodeCollection tree = new TreeNodeCollection(); LogFileService service = new LogFileService(); foreach (var lf in service.GetLogFiles()) { string date = lf.Date.ToString("yyyy-MM-dd"); string path = HttpUtility.UrlEncode(System.IO.Path.GetFileName(lf.Path)); tree.Add(CreateTreeNode(path, parentId, qs, date, "icon-notepad")); } return tree; }
/// <summary> /// Gets a list of trace log files /// </summary> /// <returns>A collection of log file items</returns> /// <remarks>/Umbraco/TraceLogViewer/TraceLog/GetLogFilesList</remarks> public IEnumerable<LogFileItem> GetLogFilesList() { LogFileService service = new LogFileService(); return service.GetLogFiles(); }