Skip to content

Bug: Logfile Content Incorrectly Parsed as Object in Log Tail View #5272

Description

@AkshayKumarCB

Spring Boot Admin Server information

  • Version: 3.5.0
  • Spring Boot version: 3.5.1
  • Configured Security: basic-auth
  • Webflux or Servlet application: webflux

Description

When viewing the log tail in the Spring Boot Admin UI, the following error is thrown in the browser console despite the logfile being fetched successfully from the actuator endpoint:

Fetching logfile failed: TypeError: i.data.indexOf is not a function
    at logtail.ts:64:60

The error occurs because i.data — which is expected to be a plain string — is instead an object. This causes .indexOf() to fail, as that method is not available on objects.

Affected File

spring-boot-admin-server-ui/src/main/frontend/services/logtail.ts — approximately line 64.

Steps to Reproduce

  1. Configure a Spring Boot application with structured/JSON logging (e.g. Logstash, logback-json encoder)
  2. Enable the logfile actuator endpoint
  3. Make sure that the logfile contains exactly a single logline in JSON format without a newline at the end.
  4. Open Spring Boot Admin and navigate to the Logfile tab for the application
  5. Observe the error in the browser console: TypeError: i.data.indexOf is not a function

Expected Behavior

The logfile content should be returned and handled as a plain string, and the log tail view should render successfully.

Actual Behavior

Axios converts the response body into a JavaScript object, causing .indexOf() to throw a TypeError, and the log tail view fails to render.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions