![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
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.
cagey-logger
Advanced tools
This is the standard logger for Cagey applications and plugins. It is heavily inspired by Bunyan, but differs in a few subtle ways:
data
property.This installs cagey-logger into your project:
npm install cagey-logger --save
The severity levels are directly modeled after Syslog:
nr | method name | description |
---|---|---|
0 | log.emergency() | System is unusable. |
1 | log.alert() | Action must be taken immediately. A condition that should be corrected immediately, such as a corrupted system database. |
2 | log.critical() | Critical conditions, such as hard device errors. |
3 | log.error() | Error conditions. |
4 | log.warning() | Warning conditions. |
5 | log.notice() | Normal but significant conditions. Conditions that are not error conditions, but that may require special handling. |
6 | log.info() | Informational messages. |
7 | log.debug() | Debug-level messages. Messages that contain information normally of use only when debugging a program. |
When you set your logger to, for example, level 5
it will output all log entries between 0 and 5 (inclusive). In other
words: from notices through emergencies.
factory
You can create a logger by calling the create
factory function on the cagey-logger module:
const createLogger = require('cagey-logger').create;
const options = {
name: 'myapp', // the name of your application
format: 'json', // 'json' or 'human', defaults to 'human' when run inside a text terminal, 'json' otherwise
level: 'debug' // will only output this level and more severe levels
};
const data = {}; // properties you want all log messages to output
const log = createLogger(options, data);
In the API descriptions below, we will use debug(), but every level has its own method, as described above in "Levels".
log.debug(string message, [any ...args])
Logs a simple message, and applies any extra arguments to the message string using util.format.
Example:
log.debug('User "%s" logged in', username);
log.debug(Object|Array data, string message, [any ...args])
Logs a simple message, with data attached. The data may be an object or an array with any amount depth you may wish to apply. Certain property names will automatically apply specialized serializers that make the object more readable or parseable.
The built-in property serializers are:
req
: HTTP IncomingMessageerror
: an Error object with a stack and optional code are assumedExample:
log.debug({ error }, 'User failed to "%s" log in', username);
log.child([Object data]) -> Logger
Creates a descendent logger, that contains the same configuration as the parent logger. You may add properties to add context for this logger that is always present in the output of the child logger.
MIT
Cagey is developed and maintained by Wizcorp.
FAQs
Logger for the Cagey game framework
We found that cagey-logger 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
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.