Skip to main content
Version: 0.1.2

Function: setDefaultAdapterLogger()

Imported from @react-logic/di

setDefaultAdapterLogger(fn): void

Swap the default adapter's logger. The adapter emits a line per construction event ("Creating class instance for X", "Creating value instance for Y", etc.) — by default routed to console.debug so it stays out of the way in production. Tests can route it to console.log (or any other sink) for visibility.

Affects only the default adapter. Custom adapters control their own logging.

Parameters

fn

(...args) => void

Returns

void