
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Paralogger is a completely customisable logger built upon it's own standard. You seperate your logs into different scopes, filter through log levels, and ultimately decide how you display, store, or broadcast them.
Install paralogger using your favourite package manager.
# npm
npm i paralogger
# yarn
yarn add paralogger
Create a logger instance to begin working with paralogger, defining a scope or leaving it to the default (SYSTEM).
const logger = new Logger('CUSTOM')
A log is made up of 4 properties.
scope - The name of the logger instancelevel - The level of the logtimestamp - The time the log was createdmessage - The text contents of the logYou assign the scope when you create your logger instance. You may have multiple logger instances, so this helps you keep track of a log's origins.
The level of a log details what the log is for. The supported log levels are.
fatal - Severe runtime errors that cause the application or subprocess to unexpectedly crasherror - A non-fatal runtime error or other unusual conditional eventswarn - For use of deprecated items and important non-error events that should be looked at.info - Used for basic system events like started or stoppeddebug - Contains information useful for debugging issues with the application, such as internal state, etc.trace - The most detailed logs, useful for logging things like network traffic, login attemps, etc.Timestamps should be presented in UTC or local time depending on the requirements of the project. UTC is recommended where possible to avoid confusion for people in different zones to the deployment or for projects with deployments in multiple timezones.
Messages are a string, and should be single line when possible. You may wish to apply your own standard for certain logs, like REST API logs, etc.
Logging to the console can be added using the following steps.
logToConsole from paralogger.on('log', logToConsole()) with your logger instanceThis adds an event handler to log to the console.
You can remove the colors by passing the colorful argument as false.
This is the format that the logToConsole() handler uses.
YYYY-MM-DD HH:MM:SS {SCOPE} {LEVEL} {MESSAGE}
You can also create your own handlers and add them to any of the events.
A handler will be passed a Log object containing the 4 properties mentioned above.
Contributions are welcome. If you wish to add something to paralogger, please make an issue to discuss it first :)
Distributed under the MIT license.
FAQs
A customisable logger for node.js
We found that paralogger 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.