vendor(cordis): document the full plugin-author surface (@param/@returns everywhere)
Comment-only enrichment across cordis/src/*.ts — Context, EventsService (+ the ctx merges), Fiber, RegistryService, ReflectService, Service, logger — so the website API generator can render a complete reference and hard-error on any future undocumented member (vendor sync included). Logged as local modification 6 in vendor/README.md; retire it when upstreamed to the fork. INHERITED_SERVICES/EVENTS source pointers refreshed for the shifted lines; cordis catalogs regenerated.
This commit is contained in:
10
vendor/cordis/src/logger.ts
vendored
10
vendor/cordis/src/logger.ts
vendored
@@ -62,8 +62,11 @@ export const defaultFormatters: Record<string, Formatter> = {
|
||||
|
||||
/** Options used when creating a named logger facade. */
|
||||
export interface LoggerOptions {
|
||||
/** The logger name shown with each message. */
|
||||
name: string
|
||||
/** Message fields merged into every record from this logger. */
|
||||
meta?: Partial<Message>
|
||||
/** Default maximum level exported when an exporter has no own threshold. */
|
||||
level?: number
|
||||
}
|
||||
|
||||
@@ -220,7 +223,12 @@ export class LoggerService {
|
||||
return self
|
||||
}
|
||||
|
||||
/** Register an exporter and dispose it with the current fiber. */
|
||||
/**
|
||||
* Register an exporter and dispose it with the current fiber.
|
||||
*
|
||||
* @param exporter — the sink that receives structured log messages.
|
||||
* @returns a disposer that removes the exporter.
|
||||
*/
|
||||
exporter(exporter: Exporter) {
|
||||
return this.ctx.effect(() => {
|
||||
this.exporters.set(++this._snExporter, exporter)
|
||||
|
||||
Reference in New Issue
Block a user