Log level manager for loglayer that keeps log levels synchronized between parent and children (parent changes affect children, but child changes don't affect parents).
npm install @loglayer/log-level-manager-one-way


A log level manager for LogLayer that keeps log levels synchronized between parent and children. Parent changes affect children, but child changes do not affect parents.
``bash`
npm install @loglayer/log-level-manager-one-way
`typescript
import { LogLayer, ConsoleTransport, LogLevel } from "loglayer";
import { OneWayLogLevelManager } from '@loglayer/log-level-manager-one-way';
const parentLog = new LogLayer({
transport: new ConsoleTransport({
logger: console
}),
}).withLogLevelManager(new OneWayLogLevelManager());
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 do not affect parent
childLog.setLevel(LogLevel.debug);
parentLog.debug('This will not be logged'); // Not logged (parent still at warn)
childLog.debug('This will be logged'); // Logged (child changed to debug)
``
For more details, visit https://loglayer.dev/log-level-managers/one-way