dotCMS / dotCMS/core

[FEATURE] Log File Listing API

Open
#35,195 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Modernization
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem

The log file dropdown (for selecting which file to tail or download) is currently populated by a JSP scriptlet in tail_log.jsp that reads the filesystem at page load. All other log functionality (tailing via SSE, downloading, logger management) already has REST coverage. Need a REST endpoint to answer "What logs can I view?"

Goal

Provide a REST endpoint that returns the list of available log files, matching the same directory and regex filter configuration used by the existing tail and download endpoints.

APIs

  • GET /v1/maintenance/_logFiles — List available log files for tailing/download

Personas

  • Developer Teams — Need REST API for Angular Log Files tab dropdown
  • System Administrators — Need to discover available log files before tailing/downloading

Legacy Reference

  • JSP: tail_log.jsp lines 36–57 (file listing scriptlet)
  • Config: TAIL_LOG_LOG_FOLDER (default ./dotsecure/logs/), TAIL_LOG_FILE_REGEX (default .*)
  • Related existing endpoints: GET /v1/logs/{fileName}/_tail, GET /v1/maintenance/_downloadLog/{fileName}
  • Target Class: MaintenanceResource.java (/api/v1/maintenance)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in MaintenanceResource.java under /api/v1/maintenance, then compare the file-listing logic in tail_log.jsp lines 36–57 with the existing tail and download endpoints. Verify the TAIL_LOG_LOG_FOLDER and TAIL_LOG_FILE_REGEX configuration, and consider the work complete when GET /v1/maintenance/_logFiles returns the matching available log files for the Angular dropdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.