@4lch4/logger
Advanced tools
Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "@4lch4/logger", | ||
"displayName": "Logger", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "A small utility for logging to console within NodeJS/TypeScript applications.", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"prepublish": "tsc", | ||
"prepublishonly": "tsc", | ||
"release": "np" | ||
}, | ||
"keywords": [], | ||
"keywords": [ | ||
"util", | ||
"logger", | ||
"log", | ||
"logging", | ||
"stdout" | ||
], | ||
"author": { | ||
@@ -33,3 +39,4 @@ "name": "4lch4", | ||
"chalk": "^4.1.0", | ||
"dayjs": "^1.10.4" | ||
"dayjs": "^1.10.4", | ||
"fs-extra": "^9.1.0" | ||
}, | ||
@@ -39,6 +46,3 @@ "devDependencies": { | ||
"np": "^7.4.0" | ||
}, | ||
"optionalDependencies": { | ||
"fs-extra": "^9.1.0" | ||
} | ||
} |
@@ -5,6 +5,23 @@ # @4lch4/logger | ||
## Installation | ||
The module is published to the NPM registry so you're able to install it as you would any other module: | ||
```shell | ||
# Using NPM | ||
npm install --save @4lch4/logger | ||
# Using Yarn | ||
yarn add @4lch4/logger | ||
# Using PNPM | ||
pnpm install @4lch4/logger | ||
``` | ||
## Usage | ||
Using the logger is fairly straight forward. Once you've installed it you can import it and instantiate a new class to be used throughout your application: | ||
Using the logger is fairly straight forward. Import the Logger, create a new instance with some optional properties, then use that instance throughout your application: | ||
> **_NOTE: You can also create new instances throughout your app and it will log to the same files/locations._** | ||
```typescript | ||
@@ -24,9 +41,7 @@ import { Logger } from '@4lch4/logger' | ||
<ul> | ||
<li style="color: Cyan">debug - Cyan</li> | ||
<li style="color: red">error - Red</li> | ||
<li style="color: gray">info - Gray</li> | ||
<li style="color: green">success - Green</li> | ||
<li style="color: yellow">warn - Yellow</li> | ||
</ul> | ||
- debug - Cyan | ||
- error - Red | ||
- info - Gray | ||
- success - Green | ||
- warn - Yellow | ||
@@ -33,0 +48,0 @@ If you provide a logDir when instantiating the Logger class, each level will have a file. For example, debug would be `2021.03.17-debug.log` whereas error would be `2021.03.17-error.log`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49
35604
56
702
+ Addedfs-extra@^9.1.0