@ecopages/logger
Advanced tools
+1
-1
@@ -1,1 +0,1 @@ | ||
| var k;(function(q){q["INFO"]="INFO";q["ERROR"]="ERROR";q["WARN"]="WARN";q["DEBUG"]="DEBUG"})(k||(k={}));var K={level:k.INFO},M={level:k.ERROR},P={level:k.WARN},Q={level:k.DEBUG};class V{prefix;constructor(j){this.prefix=j}info(...j){this.logInternal(K,...j)}warn(...j){this.logInternal(P,...j)}error(...j){this.logInternal(M,...j)}debug(...j){if(process.env.ECO_PAGES_DEBUG==="true")this.logInternal(Q,...j)}logInternal(j,...H){const z=j?{[k.INFO]:"\x1B[32m",[k.ERROR]:"\x1B[31m",[k.WARN]:"\x1B[33m",[k.DEBUG]:"\x1B[36m"}[j.level]:"",J=`${z?z:""}${this.prefix}`;console.log(J,...H,"\x1B[0m")}}export{V as Logger}; | ||
| var k;(function(q){q["INFO"]="INFO";q["ERROR"]="ERROR";q["WARN"]="WARN";q["DEBUG"]="DEBUG"})(k||(k={}));var K={level:k.INFO},M={level:k.ERROR},P={level:k.WARN},Q={level:k.DEBUG};class V{prefix;constructor(j){this.prefix=j}info(...j){this.logInternal(K,...j)}warn(...j){this.logInternal(P,...j)}error(...j){this.logInternal(M,...j)}debug(...j){if(process.env.ECOPAGES_LOGGER_DEBUG==="true")this.logInternal(Q,...j)}logInternal(j,...H){const z=j?{[k.INFO]:"\x1B[32m",[k.ERROR]:"\x1B[31m",[k.WARN]:"\x1B[33m",[k.DEBUG]:"\x1B[36m"}[j.level]:"",J=`${z?z:""}${this.prefix}`;console.log(J,...H,"\x1B[0m")}}export{V as Logger}; |
+1
-1
| { | ||
| "name": "@ecopages/logger", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "./dist/logger.js", |
+7
-0
@@ -65,1 +65,8 @@ # @ecopages/logger | ||
| ``` | ||
| Debugging Instructions | ||
| By default, the debugging feature is turned off. To enable it, please add the following line to your `.env` file: | ||
| ```sh | ||
| ECOPAGES_LOGGER_DEBUG=true | ||
| ``` |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5458
3.45%72
10.77%