Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamnnort/nestjs-logger
Logger module for NestJS - Simple - Informative - Pretty
https://github.com/iamnnort/nestjs-logger
Last synced: 10 days ago
JSON representation
Logger module for NestJS - Simple - Informative - Pretty
- Host: GitHub
- URL: https://github.com/iamnnort/nestjs-logger
- Owner: iamnnort
- License: mit
- Created: 2024-02-15T19:14:54.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T22:59:19.000Z (29 days ago)
- Last Synced: 2024-10-25T02:08:40.603Z (22 days ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@iamnnort/nestjs-logger
- Size: 465 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
## Info
Logger module for NestJS - Simple - Informative - Pretty
## Installation
```bash
yarn install @iamnnort/nestjs-logger
```## Usage
```javascript
// app.ts
import { Module } from '@nestjs/common';
import { LoggerModule } from '@iamnnort/nestjs-logger';@Module({
imports: [LoggerModule],
})
export class AppModule {}// index.ts
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app';
import { LoggerService } from '@iamnnort/nestjs-logger';async function bootstrap() {
const app = await NestFactory.create(AppModule, {
bufferLogs: true,
});app.useLogger(new LoggerService());
await app.listen(3000);
}bootstrap();
```## Output
```bash
[System] Application is starting...
[System] Application started.
[System] [Request] POST /echo {"greeting":"hello"}
[System] [Response] POST /echo {"greeting":"hello"} 200 OK
```## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.