mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Add configurable log level for Python and JS modules
Introduced LOG_LEVEL configuration in both Python and JavaScript to control logging verbosity. Updated logger initialization in canvas_node.py and LoggerUtils.js to use the new LOG_LEVEL from config files.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import {logger, LogLevel} from "../logger.js";
|
||||
import { LOG_LEVEL } from '../config.js';
|
||||
|
||||
/**
|
||||
* Tworzy obiekt loggera dla modułu z predefiniowanymi metodami
|
||||
@@ -11,8 +12,8 @@ import {logger, LogLevel} from "../logger.js";
|
||||
* @param {LogLevel} level - Poziom logowania (domyślnie DEBUG)
|
||||
* @returns {Object} Obiekt z metodami logowania
|
||||
*/
|
||||
export function createModuleLogger(moduleName, level = LogLevel.NONE) {
|
||||
logger.setModuleLevel(moduleName, level);
|
||||
export function createModuleLogger(moduleName) {
|
||||
logger.setModuleLevel(moduleName, LogLevel[LOG_LEVEL]);
|
||||
|
||||
return {
|
||||
debug: (...args) => logger.debug(moduleName, ...args),
|
||||
|
||||
Reference in New Issue
Block a user