mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Refactor logger initialization to use createModuleLogger
Replaced manual logger setup in CanvasRenderer, ImageCache, Mask_tool, and db modules with the createModuleLogger utility for cleaner and more consistent logging initialization.
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
import {logger, LogLevel} from "./logger.js";
|
||||
import {createModuleLogger} from "./LoggerUtils.js";
|
||||
|
||||
// Inicjalizacja loggera dla modułu ImageCache
|
||||
const log = {
|
||||
debug: (...args) => logger.debug('ImageCache', ...args),
|
||||
info: (...args) => logger.info('ImageCache', ...args),
|
||||
warn: (...args) => logger.warn('ImageCache', ...args),
|
||||
error: (...args) => logger.error('ImageCache', ...args)
|
||||
};
|
||||
|
||||
// Konfiguracja loggera dla modułu ImageCache
|
||||
logger.setModuleLevel('ImageCache', LogLevel.DEBUG);
|
||||
const log = createModuleLogger('ImageCache');
|
||||
|
||||
export class ImageCache {
|
||||
constructor() {
|
||||
@@ -35,4 +27,4 @@ export class ImageCache {
|
||||
log.info("Clearing image cache");
|
||||
this.cache.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user