5 Commits
Author SHA1 Message Date
Dat H. Pham b0e349029f fix(logging): minor issue for logging and docs 2026-04-28 11:31:12 +07:00
dab246 1a30b3f681 refactor(logging): rename handles() to canHandle() for clarity 2026-04-28 11:31:12 +07:00
dab246 26ed041e34 refactor(logging): pass LogRecord to handles() and add default implementation via acceptsLevel() 2026-04-28 11:31:12 +07:00
dab246 c712c9b4b0 feat(logging): support multi-instance handlers via handlerKey
Add handlerKey to LogHandler so that two instances of the same concrete
class can coexist in AppLoggerRegistry (e.g. two ConsoleLogHandlers with
different formatters, or two Sentry handlers targeting different DSNs).

Default key is runtimeType.toString(), preserving existing dedup behaviour
for handlers that do not override it.

Also add @visibleForTesting on resetForTesting() and convert LogHandler
from abstract interface class to abstract class so the default handlerKey
implementation is inherited without requiring each implementor to redeclare it.
2026-04-28 11:31:12 +07:00
dab246 3b42d3b873 refactor(logger): add LogRecord, LogHandler, Level core abstractions (ADR-0078) 2026-04-28 11:31:12 +07:00