Refactor settings management to use ~/.claude-mem/settings.json
- Updated paths in troubleshooting documentation to reflect new settings file location. - Modified diagnostics and reference files to read from ~/.claude-mem/settings.json. - Introduced getWorkerPort utility for cleaner worker port retrieval. - Enhanced ChromaSync and SDKAgent to load Python version and Claude path from settings. - Updated SettingsRoutes to validate new settings: CLAUDE_MEM_LOG_LEVEL and CLAUDE_MEM_PYTHON_VERSION. - Added early-settings module to load settings for logger and other early-stage modules. - Adjusted logger to use early-loaded log level setting. - Refactored paths to utilize early-loaded data directory setting.
This commit is contained in:
+3
-1
@@ -3,6 +3,8 @@
|
||||
* Provides readable, traceable logging with correlation IDs and data flow tracking
|
||||
*/
|
||||
|
||||
import { loadEarlySetting } from '../shared/early-settings.js';
|
||||
|
||||
export enum LogLevel {
|
||||
DEBUG = 0,
|
||||
INFO = 1,
|
||||
@@ -26,7 +28,7 @@ class Logger {
|
||||
|
||||
constructor() {
|
||||
// Parse log level from environment
|
||||
const envLevel = process.env.CLAUDE_MEM_LOG_LEVEL?.toUpperCase() || 'INFO';
|
||||
const envLevel = loadEarlySetting('CLAUDE_MEM_LOG_LEVEL', 'INFO').toUpperCase();
|
||||
this.level = LogLevel[envLevel as keyof typeof LogLevel] ?? LogLevel.INFO;
|
||||
|
||||
// Disable colors when output is not a TTY (e.g., PM2 logs)
|
||||
|
||||
Reference in New Issue
Block a user