Optimize log messages

Description

Summary:
Enhance logging in mod-linked-data to improve debugging capabilities while maintaining data security.
Logs are essential for diagnosing and resolving production issues. The purpose of this ticket is to refine logs in mod-linked-data to ensure relevant information is captured efficiently and securely.


Finding 1:
Issue:
The following INFO logs are verbose and frequently appear when an instance or work is opened for editing in the UI. These logs can clutter log files unnecessarily.

Resolution:
Convert these INFO logs to DEBUG logs to reduce noise:


Finding 2:
Issue:
When resources are created or updated through the UI, the entire DTO is logged at the INFO level. This behavior consumes excessive log space & creates potential security risks by exposing sensitive data.

Resolution:

  • Log only the resource's ID and primary title at the INFO level.

  • Include the full DTO in DEBUG logs for detailed diagnostics.


Finding 3:
Issue:
When a work or instance is updated through the UI, events are published to the inventory.instance_ingress Kafka topic. However, no INFO logs are generated for these actions.

Resolution:

  • Add INFO logs in InstanceUpdateMessageSender and InstanceCreateMessageSender to capture the IDs (and optionally the primary title) of the affected resources.


Finding 4:
Issue:
When a new work is created, an event is published to the linked-data.work Kafka topic, but no corresponding INFO logs are generated.

Resolution:

  • Add INFO logs in WorkCreateMessageSender capturing the IDs (and optionally the primary title) of the affected resources.


Finding 5:

Issue:

Tenant ID, User ID & Module name are not included in the log message. This makes debugging difficult in a multi-tenant environment

Resolution:

Update the log configuration based on the configuration available in folio-spring-base:

Environment

None

Potential Workaround

None

Checklist

hide

Activity

Show:
Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Citation

Fix versions

Release

Sunflower (R1 2025)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created January 24, 2025 at 7:22 PM
Updated last week
Resolved February 7, 2025 at 12:34 PM
TestRail: Cases
TestRail: Runs