Refactor docs: topic folders, TOON, XCUT, protocol sync - Migrated all topic documentation into dedicated folders with canonical `README.md`, `ISSUES.md`, and `TODO.md` per topic (e.g., `LOGGING/`, `SIGNALR/`, `BINARY/`, `TOON/`). - Added comprehensive TOON serializer documentation: design, format, options, attributes, inference, issues, and TODOs. - Introduced `XCUT` folder for cross-cutting issues and TODOs, with canonical entries and topic cross-references. - Updated all references and navigation to use new folder-based doc paths; fixed links and clarified doc structure. - Enhanced AI agent protocol: enforce session skill preloading, `[LOADED_DOCS: ...]` short-name prefix, and mandatory `docs-check` skill for doc/code sync. - Updated `.csproj` to include all `README.md` files for IDE visibility. - Improved and clarified SignalR, grid, and project-level documentation. - Minor code/test tweaks and doc content corrections for consistency. |
||
|---|---|---|
| .. | ||
| AcConsoleLogWriter.cs | ||
| AcLogWriterBase.cs | ||
| AcLoggerAdapter.cs | ||
| AcLoggerBase.cs | ||
| AcLoggerOptions.cs | ||
| AcLoggerServiceExtensions.cs | ||
| AcTextLogWriterBase.cs | ||
| IAcLogItemClient.cs | ||
| IAcLogWriterBase.cs | ||
| IAcLogWriterClientBase.cs | ||
| IAcLoggerBase.cs | ||
| LogLevel.cs | ||
| README.md | ||
README.md
Loggers
Custom logging framework with multi-writer fan-out and Microsoft.Extensions.Logging integration. This directory contains the core logger and writer abstractions — the defining layer for the logging system.
For full architecture, configuration, all writers, and remote logging flow see
docs/LOGGING/README.md.
Architecture
IAcLoggerBase (: IAcLogWriterBase, ILogger)
└─ AcLoggerBase (abstract, multi-writer fan-out, ILogger bridge)
└─ [concrete loggers per consuming project]
IAcLogWriterBase
└─ AcLogWriterBase (abstract, per-writer config from appsettings)
├─ AcTextLogWriterBase (abstract, text formatting)
│ └─ AcConsoleLogWriter (colored console output)
└─ [AcLogItemWriterBase<T> in AyCode.Entities — structured writers]
Two-level filtering: Logger has a global LogLevel gate; each writer has its own LogLevel. Both must pass for a log entry to be written. See docs/LOGGING/README.md → Design Overview.
Key Files
Logger Core
IAcLoggerBase.cs— Unified interface combiningIAcLogWriterBase+ILogger. ExposesGetWritersandWriter<T>().AcLoggerBase.cs— Abstract logger implementingILogger. ManagesList<IAcLogWriterBase>. Reads config fromappsettings.json(AyCode:Logger:{AppType, LogLevel, LogWriters[]}). Maps MSLogLevelto ACLogLevel. Fan-out dispatch to all writers.[Conditional("DEBUG")]variants for all methods.AcLoggerAdapter.cs—AcLoggerProvider<TLogger>implementingILoggerProviderwithConcurrentDictionary<string, TLogger>per-category cache. Extension methods:AddAcLogger<T>(),UseOnlyAcLogger<T>().
Writers
IAcLogWriterBase.cs— Writer contract:Detail(),Debug(),Info(),Warning(),Suggest(),Error(), plusWrite()overloads andWrite(IAcLogItemClient).IAcLogWriterClientBase.cs— Marker interface for client-side writers (no additional members).AcLogWriterBase.cs— Abstract base. OwnLogLevelloaded from appsettings by matchingAssemblyQualifiedName. Named methods delegate to terminalWrite(AppType, LogLevel, text, caller, category, errorType, exMessage).AcTextLogWriterBase.cs— Abstract text formatter. Format:[HH:mm:ss.fff] [AppType[0]] [Level] [Category->Method] [ThreadId] Text [Error]. Subclasses implementWriteText(string, LogLevel).AcConsoleLogWriter.cs— Colored console writer. Thread-safe viastatic lock. Colors: Gray=≤Trace, White=Debug–Info, Cyan=Suggest, Yellow=Warning, Red=≥Error.
Supporting
IAcLogItemClient.cs— Structured log item DTO interface for remote transmission (TimeStampUtc, AppType, LogLevel, ThreadId, CategoryName, CallerName, Text, Exception, ErrorType).LogLevel.cs— Byte enum: Detail(0), Trace(5), Debug(10), Info(15), Suggest(17), Warning(20), Error(25), Disabled(255). ⚠️ Values synchronized with databaseLogLeveltable — do NOT renumber.