Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
argon-logger
Advanced tools
Argon logger is a simple console utility with options to enable/disable logs for any environment. Argon logger extends the existing console API, there it works the same as console.log
but with more control and flexibility. Additionally, it doesn't throw any linting error (unless someone decides to create a rule for logger.log
too).
npm i argon-logger
Argon logger is simple to use.
import Logger from 'argon-logger';
const logger = new Logger();
logger.log('Hello'); // -> Hello
logger.warn('This is a warning'); // -> This is a warning
logger.error('This is an error'); // -> This is an error
logger.debug('This is a debug message'); // -> This is a debug message
...
By default argon logger enables log statements for localhost URLs or URLs containing debug
as a search parameter. We can change this behavior by providing a configuration.
const logger = new Logger({
allowedHostnames: ['google.com'], // List of hostnames allowed. Set this to an empty array to allow logs everywhere.
allowedQueryStringParameters: ['debug=true'], // List of query string parameters for which logs should be generated.
allowedPorts: [], // List of ports for which logging should be enabled
test: () => { ... }, // A test function for full flexibility on customizing where to hide the logs
// A test function overrides existing filters.
disable: false // If set to "true" disables the logging completely. The remaining two parameters are ignored.
});
logger.log('Hello'); // Hello
logger.warn('This is a warning'); // This is a warning
...
Argon logger doesn't have any major releases yet. It means it has potential to break in few scenarios. We need your contribution to make it better. Please email at contactsachinsingh@gmail.com if you want to become a contributor.
FAQs
A simple console logging utility
The npm package argon-logger receives a total of 538 weekly downloads. As such, argon-logger popularity was classified as not popular.
We found that argon-logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.