Gathering detailed insights and metrics for @teamteanpm2024/rerum-recusandae-porro
Gathering detailed insights and metrics for @teamteanpm2024/rerum-recusandae-porro
npm install @teamteanpm2024/rerum-recusandae-porro
Typescript
Module System
Node Version
NPM Version
54.5
Supply Chain
94.4
Quality
79.2
Maintenance
100
Vulnerability
100
License
Cumulative downloads
Total Downloads
Last day
0%
0
Compared to previous day
Last week
0%
0
Compared to previous week
Last month
0%
0
Compared to previous month
Last year
0%
0
Compared to previous year
37
A wrapper of winstonjs logger, replacing deprecated logger from KOMODO-SDK.
This logger should be used by TEKTRANS projects. But ofcourse you can use it too.
1npm i @teamteanpm2024/rerum-recusandae-porro
Using @teamteanpm2024/rerum-recusandae-porro is easy. Just include the module and you can use it with default behaviors.
1const logger = require('@teamteanpm2024/rerum-recusandae-porro'); 2 3logger.info('User created', { 4 username: 'johndoe', 5 fullename: 'John Doe', 6 comment: 'who is he?', 7}); 8 9logger.warn('A warn message', { 10 eCode: e.code, eMessage: e.message 11});
See here for more examples.
You can override behavior by using environment (process.env) or global variable or by specified in config object. Remember to put those override statement before first call of "require('@teamteanpm2024/rerum-recusandae-porro')" statement.
Here is the list:
1{ 2 level: 'verbose', 3 label: null, 4 5 // default is "logs" directory on current workdir 6 directory: path.join(process.cwd(), 'logs'), 7 8 filename: 'log', 9 10 // default is using generic level value 11 console_level: null, 12 13 // default is using generic level value 14 file_level: null, 15 16 // default is no old file removal 17 max_files: null, 18}
See examples/using-config.js for usage example of using config object.
Redis transport can be enabled by putting "redis" property on config object.
This config object will use default options for redis transport:
1{ 2 // ... 3 redis: true 4}
This will specify some property of redis transport:
1{ 2 // ... 3 redis: { 4 level: 'verbose', 5 host: 'localhost', 6 port: 6379, 7 auth: null, 8 channel: null, 9 } 10}
See examples/redis.js for code example.
Looks like logger.end() will not wait for all logs to be flushed on redis. Expect for missing some of last logs on redis. Or you can put some delay (like 1-2 seconds) before closing the logger with end method.
See CHANGELOG.md.
Licensed under MIT License (see this file).
Feel free to use or fork it if you think it would be usefull for you.
Copyright PT. TEKNOLOGI TRANSAKSI DIGITAL (TEKTRANS) 2021.
No vulnerabilities found.
No security vulnerabilities found.