@alwatr/logger
Advanced tools
Comparing version 0.21.0 to 0.22.0
@@ -6,2 +6,12 @@ # Change Log | ||
# [0.22.0](https://github.com/AliMD/alwatr/compare/v0.21.0...v0.22.0) (2022-11-20) | ||
### Bug Fixes | ||
- **logger:** message format in node ([0ab9153](https://github.com/AliMD/alwatr/commit/0ab9153e407cafd07af8b77b63e25c8d21b474c0)) | ||
### Features | ||
- **logger:** better log in browser and node ([1a35ac4](https://github.com/AliMD/alwatr/commit/1a35ac4bbb9aae4280ea99b8383459cf44de0baa)) | ||
# [0.21.0](https://github.com/AliMD/alwatr/compare/v0.20.0...v0.21.0) (2022-11-13) | ||
@@ -8,0 +18,0 @@ |
@@ -101,7 +101,7 @@ const isBrowser = typeof process === 'undefined'; | ||
accident: isBrowser | ||
? console.warn.bind(console, '%c%s%c.%s "%s" => Accident: "%s" (%s)!', styleScope, scope, style.reset) | ||
: console.warn.bind(console, `${styleScope}⚠️ %s\x1b[33m.%s "%s" =>${style.reset}`, scope), | ||
? console.warn.bind(console, '%c%s%c.%s() Accident `%s` %s!', styleScope, scope, style.reset) | ||
: console.warn.bind(console, `${styleScope}⚠️\n%s\x1b[33m.%s() Accident \`%s\` %s!${style.reset}`, scope), | ||
error: isBrowser | ||
? console.error.bind(console, '%c%s%c.%s "%s" =>', styleScope, scope, style.reset) | ||
: console.error.bind(console, `${styleScope}❌ %s\x1b[31m.%s "%s" =>\x1b[0;2m`, scope), | ||
? console.error.bind(console, '%c%s%c.%s() Error `%s`\n', styleScope, scope, style.reset) | ||
: console.error.bind(console, `${styleScope}❌\n%s\x1b[31m.%s() Error \`%s\`${style.reset}\n`, scope), | ||
}; | ||
@@ -125,6 +125,6 @@ if (!debug) { | ||
logMethodArgs: console.debug.bind(console, keySection + '.%s(%o);', styleScope, scope, style.reset), | ||
logMethodFull: console.debug.bind(console, keySection + '.%s(%o); // %o', styleScope, scope, style.reset), | ||
logMethodFull: console.debug.bind(console, keySection + '.%s(%o) => %o', styleScope, scope, style.reset), | ||
incident: isBrowser | ||
? console.log.bind(console, '%c%s%c.%s() => Incident: "%s" (%s)!', styleScope, scope, style.reset) | ||
: console.log.bind(console, `${styleScope}🔸 %s${style.reset}.%s() => Incident: "%s" (%s)!\x1b[0;2m`, scope), | ||
? console.log.bind(console, '%c%s%c.%s() Incident `%s` %s!', styleScope, scope, 'color: orange;') | ||
: console.log.bind(console, `${styleScope}🚸\n%s${style.reset}.%s() Incident \`%s\` %s!${style.reset}`, scope), | ||
logOther: console.debug.bind(console, keySection, styleScope, scope, style.reset), | ||
@@ -131,0 +131,0 @@ }; |
{ | ||
"name": "@alwatr/logger", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "b4a565ee520e5a9fab404f539463109b6af19aa9" | ||
"gitHead": "2c45f39d4f1d684c9580ed28501b31b7c170ebd4" | ||
} |
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
28134