
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
yarn add monogatari
Comes with chalk as a dependency.
import Logger from 'monogatari';
const logger = new Logger();
logger.error(new Error('This is an error object’s trace.'));
logger.error('This is an error message.');
logger.warning({ a: 'Oh, no, a warning within an object'});
logger.success('All good!');
logger.debug('Some debug info');
logger.debug({ firstName: 'Jon', email: 'jon@gmail.com' });
When you define a new instance of the logger, you can provide a configuration object in the constructor to customize the behaviour based on the environment.
import Logger from 'monogatari';
// If env is "production" then logger looks at the enabledInProduction flag.
// Everything is turned off by default and you must override with the keys you want to be logged.
// For example:
const logger = new Logger({
env: process.env.NODE_ENV,
enabledInProduction: {
error: true,
warning: true,
}
});
// visible if env is "production"
logger.error('This is an error message.');
logger.warning({ a: 'Oh, no, a warning within an object'});
// not visible if env is "production"
logger.success('All good!');
logger.debug('Some debug info')
FAQs
Opinionated logger with chalk.js
We found that monogatari demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.