
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
nestjs-cls-logger
Advanced tools
Thanks very much for the excellent content below:
This is a simplified version of NestJS CLS Logger. Implementing console logging functionality while tracing the processing flow through Correlation IDs.
Also capable of sending 'fatal' and 'emergency' level information to a specified Slack webhook in the production environment
npm i nestjs-cls-logger
# install nest cli
npm i -g @nestjs/cli
# create sample app
nest new sample-app
cd sample-app
npm i nestjs-cls-logger
// ./src/app.module.ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { NestJsClsLoggerModule } from 'nestjs-cls-logger';
@Module({
imports: [NestJsClsLoggerModule.forRoot({ tag: 'app.sample' })],
// imports: [NestJsClsLoggerModule.forRoot({ tag: 'app.sample', overrideConsole: true })]
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
// ./src/main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { NestjsLoggerServiceAdapter } from 'nestjs-cls-logger';
async function bootstrap() {
const app = await NestFactory.create(AppModule, { bufferLogs: true });
app.useLogger(app.get(NestjsLoggerServiceAdapter));
await app.listen(3000);
}
bootstrap();
// ./src/app.service.ts
import { Injectable } from '@nestjs/common';
import { LoggerService } from 'nestjs-cls-logger';
@Injectable()
export class AppService {
constructor(private readonly logger: LoggerService) {}
getHello(): string {
this.logger.debug('start!');
return 'Hello World!';
}
}
npm run start:dev
FAQs
nestjs cls logger npm
The npm package nestjs-cls-logger receives a total of 307 weekly downloads. As such, nestjs-cls-logger popularity was classified as not popular.
We found that nestjs-cls-logger demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.