Log level manager for loglayer that keeps log levels synchronized between parent and children (parent and child changes affect each other bidirectionally).
npm install @loglayer/log-level-manager-linked


A log level manager for LogLayer that keeps log levels synchronized between parent and children. Parent and child changes affect each other bidirectionally.
``bash`
npm install @loglayer/log-level-manager-linked
`typescript
import { LogLayer, ConsoleTransport, LogLevel } from "loglayer";
import { LinkedLogLevelManager } from '@loglayer/log-level-manager-linked';
const parentLog = new LogLayer({
transport: new ConsoleTransport({
logger: console
}),
}).withLogLevelManager(new LinkedLogLevelManager());
const childLog = parentLog.child();
// Parent changes affect children
parentLog.setLevel(LogLevel.warn);
childLog.info('This will not be logged'); // Not logged (affected by parent)
// Child changes also affect parent
childLog.setLevel(LogLevel.debug);
parentLog.debug('This will be logged'); // Logged (affected by child)
childLog.debug('This will be logged'); // Logged (child changed to debug)
``
For more details, visit https://loglayer.dev/log-level-managers/linked