Files
MajoorWaldi-ComfyUI-Majoor-…/js/utils/logging.js
T
Your Name 1646e2171b feat: Implement duplicate detection and similarity analysis features
- Added DuplicatesService for background duplicate analysis and similarity detection.
- Introduced endpoints for analyzing duplicates, checking status, and merging tags.
- Created utility functions for file hashing and perceptual hashing.
- Implemented watcher settings for runtime tuning of debounce and deduplication.
- Added database maintenance tools for resetting and deleting the database.
- Enhanced error handling with sanitization for client responses.
- Added tests for duplicates service and error handling.
- Updated ESLint configuration for better code quality checks.
- Introduced filename validation and logging utilities.
2026-02-08 15:11:17 +01:00

19 lines
654 B
JavaScript

import { APP_CONFIG } from "../app/config.js";
import { comfyToast } from "../app/toast.js";
export function reportError(err, context = "Majoor", { showToast = false, toastType = "error" } = {}) {
const message = err?.message || String(err || "Unknown error");
try {
if (APP_CONFIG.DEBUG_VERBOSE_ERRORS) {
console.error(`[Majoor][${context}]`, message, err);
} else {
console.debug(`[Majoor][${context}]`, message);
}
} catch {}
if (showToast && APP_CONFIG.DEBUG_VERBOSE_ERRORS) {
try {
comfyToast(`${context}: ${message}`, toastType, 4000);
} catch {}
}
}