@alwatr/logger
Advanced tools
Comparing version 4.0.6 to 4.0.7
@@ -6,2 +6,9 @@ # Change Log | ||
## [4.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.6...@alwatr/logger@4.0.7) (2024-10-25) | ||
### Dependencies update | ||
* bump the development-dependencies group across 1 directory with 2 updates ([2dfda9e](https://github.com/Alwatr/nanolib/commit/2dfda9ec38a595f1fd961490d1a2fbf060f20a66)) by @dependabot[bot] | ||
* bump the development-dependencies group with 8 updates ([16847ac](https://github.com/Alwatr/nanolib/commit/16847acba91da027c422e3910d0f2dcc1f084e93)) by @dependabot[bot] | ||
## [4.0.6](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.5...@alwatr/logger@4.0.6) (2024-10-12) | ||
@@ -15,8 +22,8 @@ | ||
* **logger:** Update default debug mode logic for prevent side-effects ([42101d6](https://github.com/Alwatr/nanolib/commit/42101d6471bd0d4e88e47dc8321dddc1cd63cec8)) by @AliMD | ||
- **logger:** Update default debug mode logic for prevent side-effects ([42101d6](https://github.com/Alwatr/nanolib/commit/42101d6471bd0d4e88e47dc8321dddc1cd63cec8)) by @AliMD | ||
### Code Refactoring | ||
* **logger:** prevent side-effects ([e084894](https://github.com/Alwatr/nanolib/commit/e084894cdc4b46d52d99be872f5f789fe83c3cc0)) by @mohammadhonarvar | ||
* prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar | ||
- **logger:** prevent side-effects ([e084894](https://github.com/Alwatr/nanolib/commit/e084894cdc4b46d52d99be872f5f789fe83c3cc0)) by @mohammadhonarvar | ||
- prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar | ||
@@ -27,3 +34,3 @@ ## [4.0.4](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.3...@alwatr/logger@4.0.4) (2024-10-11) | ||
* include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD | ||
- include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD | ||
@@ -38,3 +45,3 @@ ## [4.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.2...@alwatr/logger@4.0.3) (2024-10-11) | ||
* bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot] | ||
- bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot] | ||
@@ -49,27 +56,27 @@ ## [4.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.0...@alwatr/logger@4.0.1) (2024-10-08) | ||
* **logger:** logModule renamed to logFileModule | ||
* **logger:** definePackage and dedupt remove! | ||
- **logger:** logModule renamed to logFileModule | ||
- **logger:** definePackage and dedupt remove! | ||
### Features | ||
* **logger:** add logStep method to logger ([860aeed](https://github.com/Alwatr/nanolib/commit/860aeedb2da390ee3d47c037b22a37f73e6dbbbc)) by @AliMD | ||
* use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar | ||
- **logger:** add logStep method to logger ([860aeed](https://github.com/Alwatr/nanolib/commit/860aeedb2da390ee3d47c037b22a37f73e6dbbbc)) by @AliMD | ||
- use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar | ||
### Bug Fixes | ||
* all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar | ||
- all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar | ||
### Code Refactoring | ||
* **logger:** remove definePackage from logger ([c8a9d0c](https://github.com/Alwatr/nanolib/commit/c8a9d0cdcc3e45e7a33731ec6ee6a496451e9eb1)) by @mohammadhonarvar | ||
* **logger:** rename logModule to logFileModule ([1f6bd71](https://github.com/Alwatr/nanolib/commit/1f6bd71272007f5bbc90258ffa13b7d851e0918c)) by @AliMD | ||
- **logger:** remove definePackage from logger ([c8a9d0c](https://github.com/Alwatr/nanolib/commit/c8a9d0cdcc3e45e7a33731ec6ee6a496451e9eb1)) by @mohammadhonarvar | ||
- **logger:** rename logModule to logFileModule ([1f6bd71](https://github.com/Alwatr/nanolib/commit/1f6bd71272007f5bbc90258ffa13b7d851e0918c)) by @AliMD | ||
### Miscellaneous Chores | ||
* **logger:** change the license to AGPL-3.0 ([4bb4673](https://github.com/Alwatr/nanolib/commit/4bb4673972069a307e799cad9a5078b0288a9340)) by @AliMD | ||
* Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD | ||
- **logger:** change the license to AGPL-3.0 ([4bb4673](https://github.com/Alwatr/nanolib/commit/4bb4673972069a307e799cad9a5078b0288a9340)) by @AliMD | ||
- Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD | ||
### Dependencies update | ||
* bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot] | ||
- bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot] | ||
@@ -84,4 +91,4 @@ ## [3.2.14](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.13...@alwatr/logger@3.2.14) (2024-09-21) | ||
* bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot] | ||
* update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD | ||
- bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot] | ||
- update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD | ||
@@ -92,3 +99,3 @@ ## [3.2.12](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.11...@alwatr/logger@3.2.12) (2024-08-31) | ||
* Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @ | ||
- Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @ | ||
@@ -103,3 +110,3 @@ ## [3.2.11](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.10...@alwatr/logger@3.2.11) (2024-08-31) | ||
* update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD | ||
- update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD | ||
@@ -110,3 +117,3 @@ ## [3.2.9](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.8...@alwatr/logger@3.2.9) (2024-07-04) | ||
* update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @ | ||
- update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @ | ||
@@ -117,3 +124,3 @@ ## [3.2.8](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.7...@alwatr/logger@3.2.8) (2024-05-12) | ||
* upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD | ||
- upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD | ||
@@ -132,7 +139,7 @@ ## [3.2.7](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.6...@alwatr/logger@3.2.7) (2024-04-25) | ||
* exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD | ||
- exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD | ||
### Miscellaneous Chores | ||
* **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD | ||
- **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD | ||
@@ -139,0 +146,0 @@ ## [3.2.4](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.3...@alwatr/logger@3.2.4) (2024-01-24) |
{ | ||
"name": "@alwatr/logger", | ||
"version": "4.0.6", | ||
"version": "4.0.7", | ||
"description": "Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.", | ||
@@ -70,13 +70,13 @@ "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>", | ||
"dependencies": { | ||
"@alwatr/package-tracer": "^1.0.6", | ||
"@alwatr/platform-info": "^1.2.6" | ||
"@alwatr/package-tracer": "^1.0.7", | ||
"@alwatr/platform-info": "^1.2.7" | ||
}, | ||
"devDependencies": { | ||
"@alwatr/nano-build": "^2.0.2", | ||
"@alwatr/nano-build": "^2.0.3", | ||
"@alwatr/prettier-config": "^1.0.6", | ||
"@alwatr/tsconfig-base": "^1.3.2", | ||
"@types/node": "^22.7.5", | ||
"@alwatr/tsconfig-base": "^1.3.3", | ||
"@types/node": "^22.8.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"gitHead": "15d12342d2e69fbb6129675cce620132c5bd0bfc" | ||
"gitHead": "a1e430a02f9a5711fc43f19012091bcd8806c4f9" | ||
} |
@@ -7,6 +7,6 @@ ## Logger | ||
* **Customizable Scopes:** Organize log messages using scopes for easy filtering and debugging. | ||
* **Colorful Output:** Visually distinguish different log levels and scopes with vibrant colors. | ||
* **Debug/Development Mode:** Control log verbosity to optimize performance in production environments. | ||
* **Tiny Footprint:** Minimal overhead, keeping your project lean and efficient. | ||
- **Customizable Scopes:** Organize log messages using scopes for easy filtering and debugging. | ||
- **Colorful Output:** Visually distinguish different log levels and scopes with vibrant colors. | ||
- **Debug/Development Mode:** Control log verbosity to optimize performance in production environments. | ||
- **Tiny Footprint:** Minimal overhead, keeping your project lean and efficient. | ||
@@ -22,3 +22,3 @@ ### Installation | ||
```typescript | ||
import { createLogger } from '@alwatr/logger'; | ||
import {createLogger} from '@alwatr/logger'; | ||
@@ -28,7 +28,7 @@ const logger = createLogger('my-module'); // Create a logger with a specific scope | ||
function greet(name: string) { | ||
logger.logMethodArgs?.('greet', { name }); // Log the method call with its arguments | ||
console.log(`Hello, ${name}!`); | ||
logger.logMethodArgs?.('greet', {name}); // Log the method call with its arguments | ||
console.log(`Hello, ${name}!`); | ||
} | ||
greet('Ali'); | ||
greet('Ali'); | ||
``` | ||
@@ -38,15 +38,15 @@ | ||
* **`logProperty(propertyName, value)`:** Logs a property change (useful for tracking state). | ||
* **`logFileModule(fileName)`:** Logs the module's file name for easy identification. | ||
* **`logMethod(methodName)`:** Logs the entry into a function or method. | ||
* **`logMethodArgs(methodName, args)`:** Logs a method call with its arguments. | ||
* **`logStep(methodName, stepName, props?)`:** Logs specific steps within a method. | ||
* **`logMethodFull(methodName, args, result)`:** Logs a method call with arguments and result. | ||
* **`incident(methodName, code, ...args)`:** Logs an event or expected incident (informational). | ||
* **`accident(methodName, code, ...args)`:** Logs an unexpected incident or handled error (warning). | ||
* **`error(methodName, code, ...args)`:** Logs an unexpected error (critical). | ||
* **`logOther(...args)`:** General-purpose logging with styled scope. | ||
* **`time(label)`:** Starts a timer. | ||
* **`timeEnd(label)`:** Ends a timer and logs the elapsed time. | ||
* **`banner(message)`:** Logs a large, prominent banner message. | ||
- **`logProperty(propertyName, value)`:** Logs a property change (useful for tracking state). | ||
- **`logFileModule(fileName)`:** Logs the module's file name for easy identification. | ||
- **`logMethod(methodName)`:** Logs the entry into a function or method. | ||
- **`logMethodArgs(methodName, args)`:** Logs a method call with its arguments. | ||
- **`logStep(methodName, stepName, props?)`:** Logs specific steps within a method. | ||
- **`logMethodFull(methodName, args, result)`:** Logs a method call with arguments and result. | ||
- **`incident(methodName, code, ...args)`:** Logs an event or expected incident (informational). | ||
- **`accident(methodName, code, ...args)`:** Logs an unexpected incident or handled error (warning). | ||
- **`error(methodName, code, ...args)`:** Logs an unexpected error (critical). | ||
- **`logOther(...args)`:** General-purpose logging with styled scope. | ||
- **`time(label)`:** Starts a timer. | ||
- **`timeEnd(label)`:** Ends a timer and logs the elapsed time. | ||
- **`banner(message)`:** Logs a large, prominent banner message. | ||
@@ -60,3 +60,3 @@ ### Enabling Debug Mode | ||
3. Find "Local Storage" and locate your application's domain. | ||
4. Add a new key-value pair: `debug` with the value `1`. | ||
4. Add a new key-value pair: `ALWATR_DEBUG` with the value `1`. | ||
5. Reload the page. | ||
@@ -67,3 +67,3 @@ | ||
```javascript | ||
window.localStorage?.setItem('debug', '1'); | ||
window.localStorage?.setItem('ALWATR_DEBUG', '1'); | ||
``` | ||
@@ -70,0 +70,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
80872