Skip to main content.

Silent ModeDisable log messages when you don't need them.

There may be cases where you want to disable your log messages from being outputted to the console, such as during testing. LambdaLog provides a silent configuration option that will prevent messages from being written to the console.

With silent mode enabled, your log messages will still be generated but not outputted to the console. This allows for more advanced functionality if needed.

Enabling Silent Mode

Depending on how you are implementing LambdaLog into your project, you can enable this option easily.

1const log = require('lambda-log');
2 
3// Enable silent mode
4log.options.silent = true;
1const { LambdaLog } = require('lambda-log');
2 
3const log = new LambdaLog({
4 // Enable silent mode
5 silent: true
6});
7 
8// You can still disable it later in your process with:
9log.options.silent = false;