[GH-ISSUE #4413] [CHORE]: Update this.constructor.name usage #2814

Closed
opened 2026-02-22 18:31:23 -05:00 by yindo · 0 comments
Owner

Originally created by @timothycarambat on GitHub (Sep 19, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4413

Originally assigned to: @angelplusultra on GitHub.

What would you like to see?

In the server and collector we make use of this.constructor.name for the logger of many classes so that for debugging and observability, we know where logs are coming from.

The issue is that in some forms of AnythingLLM, minification is used which can result in the minified name of the Class being used in the logger - which is useless.

Where possible, we should statically hardcode the string in the log call. This may be very tedious and possibly can just be a class prop we use (eg: this.classname="myClassObj"). This will prevent weird minification side effects from occurring.

Originally created by @timothycarambat on GitHub (Sep 19, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4413 Originally assigned to: @angelplusultra on GitHub. ### What would you like to see? In the `server` and `collector` we make use of `this.constructor.name` for the logger of many classes so that for debugging and observability, we know where logs are coming from. The issue is that in some forms of AnythingLLM, minification is used which can result in the _minified_ name of the Class being used in the logger - which is useless. Where possible, we should statically hardcode the string in the log call. This may be very tedious and possibly can just be a class prop we use (eg: `this.classname="myClassObj"`). This will prevent weird minification side effects from occurring.
yindo added the enhancementfeature request labels 2026-02-22 18:31:23 -05:00
yindo closed this issue 2026-02-22 18:31:23 -05:00
yindo changed title from [CHORE]: Update `this.constructor.name` usage to [GH-ISSUE #4413] [CHORE]: Update `this.constructor.name` usage 2026-06-05 14:48:41 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2814