![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.
gc-json-logger
Advanced tools
Log JSON entries to stdout/stderr to be queried in Google Cloud Monitoring
Allows printing logs to stdout
, stderr
for further action in Google Cloud platform. Given that log agent ingests logs from stdout
streams when running in GKE.
A logger makes use of async_hooks
module which is currently experimental. However, the use of async_hooks
mechanism was at basic.
npm install --save gc-json-logger
yarn add gc-json-logger
const { Logger } = require('gc-json-logger');
const { createServer } = require('http');
let job = 0;
function scheduleJob() {
/**
* 4) Retrieving a context logger
*/
const logger = Logger.getLogger();
/**
* 5) Logs with job id from the parent
*/
logger.info('scheduling job');
setTimeout(() => {
/**
* 6) Logs with job id from the parent
*/
logger.info('job done');
}, 3000);
}
const server = createServer((_, res) => {
job++;
/**
* 1) Setting a context logger using job id
*/
const logger = new Logger(job);
Logger.setLogger(logger);
/**
* 2) Logs with with job id
*/
logger.info('creating a new job');
/**
* 3) Calls another function that uses the context
*/
scheduleJob();
res.setHeader('content-type', 'application/json');
res.end(JSON.stringify({ id: job, status: 'scheduled' }));
});
server.listen(8080);
{
"severity": "INFO",
"time": "2022-12-03T10:00:00.000Z",
"message": "creating a new job",
"logging.googleapis.com/operation": { "id": 1 } // <- always includes context id
}
{
"severity": "INFO",
"time": "2022-12-03T10:00:00.398Z",
"message": "scheduling job",
"logging.googleapis.com/operation": { "id": 1 } // <- always includes context id
}
{
"severity": "INFO",
"time": "2022-12-03T10:00:01.000Z",
"message": "job done",
"logging.googleapis.com/operation": { "id": 1 } // <- always includes context id
}
FAQs
Log JSON entries to stdout/stderr to be queried in Google Cloud Monitoring
The npm package gc-json-logger receives a total of 718 weekly downloads. As such, gc-json-logger popularity was classified as not popular.
We found that gc-json-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.