Commit Graph
7 Commits
Author SHA1 Message Date
Dariusz L 5a8e68655f refactor: rename Model Linker to Model Resolver
Replace all link dialog terminology with resolver terminology
throughout the codebase, including module names, CSS classes,
IDs, JS variables, SVG gradient IDs, and log module names.
Remove the old web/linker/ tree and introduce the new web/resolver/
tree with parallel structure. Also replace core/linker.py with
core/resolver.py.
2026-06-05 05:53:39 +02:00
Dariusz L 780ef9d0ef refactor(log_system): bump to v1.5.2 — bracket-wrapped console output, shared file handlers, and milliseconds toggle
Console output (ColoredFormatter):
- Level name is now wrapped in [LEVEL] and left-padded via _format_level.
- Timestamp and root-label segments are individually bracket-wrapped, keeping
  plain-output layout consistent with coloured output.
- Separator between fields is colourised (colour code derived from level theme)
  so the table structure remains readable.
- New include_milliseconds init flag controls whether a fractional-second suffix
  is appended to the timestamp; _format_time respects it.
- _display_logger_name unchanged; _split_logger_name still decomposes dotted names
  into root / detail parts.

File logging (AzLogsLogger):
- file_handlers dict introduced to cache one RotatingFileHandler per top-level
  root module, preventing duplicate handlers when multiple sub-modules log to
  the same file (_get_file_handler / _get_log_file / _root_module_name).
- File handler formatter upgraded from a bare logging.Formatter to ColoredFormatter
  (colours off, milliseconds on, datefmt hard-coded to
  '%Y-%m-%d %H:%M:%S') so file output carries the same column structure as
  the console formatter.
- reset_loggers method properly removes and closes all handlers (StreamHandler
  and RotatingFileHandler) from every configured logger before clearing
  self.loggers and self.file_handlers, allowing _get_logger to be called again
  with fresh settings.
- set_file_logging now delegates to reset_loggers instead of simply clearing
  the loggers dict.
2026-05-20 01:34:51 +02:00
Dariusz L 0c7c76b263 refactor(log_system): bump version to 1.5.1; add ruff noqa T201 to log_funcs and logger
- Increment log_system version from 1.5.0 to 1.5.1 in all module docstrings
- Add # ruff: noqa: T201 to log_funcs.py and logger.py to suppress
  ruff T201 (favored print() usage) warning in logging utility modules
2026-05-19 07:59:16 +02:00
Dariusz L bcd947e37d feat(log_system): add USE_COLORS config option for ANSI console color support
- Bump version to 1.5.0 in config.py, log_funcs.py, and logger.py
- Add USE_COLORS = True to core/log_system/config.py
- Import USE_COLORS in log_funcs.py and pass it to the logger context as
  use_colors, honouring AZLOGS_USE_COLORS env var when set
2026-05-19 07:35:52 +02:00
Dariusz L 34e3d73f3f refactor(logging): add configurable field widths for log level and source
- Set default level/source field widths to 0 (no extra spacing) in DEFAULT_CONFIG
- Add level_field_width and source_field_width parameters to ColoredFormatter
- Pad/center level tag and ljust source tag ([name:lineno]) consistently
- Add _field_width() helper to safely convert config values to non-negative ints
- Pass config widths through to ColoredFormatter in AzLogsLogger setup
- Set LOG_MODULE_NAME to 'MLinker' in config.py
2026-05-17 03:47:24 +02:00
Dariusz L a288b26b66 refactor(logging): AzLogs v1.4.1 with dynamic storage and utilities
Enhance logging system with configurable module names and dynamic
localStorage keys to avoid conflicts between multiple plugin instances.

- Add LOG_MODULE_NAME and DEFAULT_LOGGER_NAME to web/log_system/config.js
- Update logger.js to use dynamic storage keys based on module name
- Change window property from ResolutionMasterLogger to dynamic key
- Add PyDoc metadata to core/log_system/config.py
- Add JSDoc metadata blocks to all web log_system files

Reorganize web utilities:
- Move css-loader.js from web/ to web/utils/
- Add ErrorHandler.js for centralized error handling
- Add ResourceManager.js for stylesheet and template loading

 rename: web/css-loader.js => web/utils/css-loader.js
2026-05-11 02:41:30 +02:00
Dariusz L e8b49dd184 Add AzLogs logging system and integrate
Introduce a new logging subsystem under core/log_system (logger.py, config.py, log_funcs.py) implementing AzLogs (LogLevel enum, colored console output, optional file rotation) and a lightweight wrapper (log_debug/info/warn/error/exception) with safe fallback when AzLogs is unavailable. Integrate these log functions across many core modules (downloader, linker, matcher, scanner, workflow_analyzer, workflow_updater, sources and related files) and export logger and helper log functions from core.__init__. Replace several direct logging calls in linker with the new log_* helpers and update core.__init__ exports. Also include small code style and robustness tweaks (path/filename normalization, JSON/file handling, minor refactors and formatting fixes) to improve matching and model-list/popular lookups.
2026-04-21 23:51:46 +02:00