New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opengeekslab_llc/nest-custom-logger

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opengeekslab_llc/nest-custom-logger - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "@opengeekslab_llc/nest-custom-logger",
"version": "0.2.0",
"version": "0.2.1",
"description": "Logger that throw to output json logs",

@@ -5,0 +5,0 @@ "main": "src/index.ts",

@@ -1,1 +0,44 @@

# nest-custom-logger
# nest-custom-logger
---
## Usage
---
### Simple usage
```ts
import { Logger } from '@opengeekslab_llc/nest-custom-logger';
const logger = new Logger(!process.env.NODE_ENV)('Hello');
logger.log('World')
```
---
### Extended usage
```ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { Logger, requestLoggerMiddleware } from '@opengeekslab_llc/nest-custom-logger';
const port = 8000;
function CustomLogger(context: string) {
return new Logger(!process.env.NODE_ENV)(context);
}
async function bootstrap() {
const logger = CustomLogger('NEST');
const app = await NestFactory.create(AppModule, {
logger,
});
// use this middleware to show http logs in your console
app.use(requestLoggerMiddleware);
await app.listen(port);
logger.log(`app is listening on port ${port}`);
}
bootstrap();
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc