ILogger
●tagtree · /core·interface
Minimal structured-log interface that cache adapters and the instance internals use to report events without pulling in a concrete logging dependency.
Properties
PROPTYPEDESCRIPTION
debug
(msg: string, meta: Record<string, unknown>) => void
error
(msg: string, meta: Record<string, unknown>) => void
info
(msg: string, meta: Record<string, unknown>) => void
warn
(msg: string, meta: Record<string, unknown>) => void
Example
const myLogger: ILogger = {
debug: (msg) => process.stdout.write(`[debug] ${msg}\n`),
info: (msg) => process.stdout.write(`[info] ${msg}\n`),
warn: (msg) => process.stderr.write(`[warn] ${msg}\n`),
error: (msg) => process.stderr.write(`[error] ${msg}\n`),
};
const cache = createCacheInstance(mySchema, myAdapter, { logger: myLogger });Related
ContractTestOptions runAdapterContract AdapterCtx CacheAdapter CacheInstance CacheKey CacheSchema CacheSchemaShape
MetadataOpen in GitHub ↗
FanoutInput
Arguments to computeFanout describing which entity to expand and the optional tenant and param values that narrow the resulting tag set.
InvalidateNamespace
Typed invalidation surface generated from a CacheSchemaShape; exposes a method per declared entity plus tenant and all shortcuts, so callers get autocompletion