@stackone/logger
Advanced tools
| let e=function(e){return e[e.Trace=0]=`Trace`,e[e.Debug=1]=`Debug`,e[e.Info=2]=`Info`,e[e.Warning=3]=`Warning`,e[e.Error=4]=`Error`,e}({});exports.LogLevel=e; |
| //#region src/types.d.ts | ||
| interface ILogger { | ||
| debug({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| info({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| warning({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| error, | ||
| code, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| error?: LogError; | ||
| code?: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| error({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| error, | ||
| code, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| error?: LogError; | ||
| code: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| } | ||
| type LogError = Error & { | ||
| response?: { | ||
| data?: unknown; | ||
| }; | ||
| context?: Record<string, unknown>; | ||
| url?: string; | ||
| }; | ||
| declare enum LogLevel { | ||
| Trace = 0, | ||
| Debug = 1, | ||
| Info = 2, | ||
| Warning = 3, | ||
| Error = 4, | ||
| } | ||
| type Log = { | ||
| level: LogLevel; | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| error?: LogError; | ||
| code?: string; | ||
| context?: Record<string, unknown>; | ||
| }; | ||
| //#endregion | ||
| export { type ILogger, type Log, type LogError, LogLevel }; |
+1
-1
@@ -80,2 +80,2 @@ //#region src/types.d.ts | ||
| //#endregion | ||
| export { ILogger, Log, LogError, LogLevel }; | ||
| export { type ILogger, type Log, type LogError, LogLevel }; |
+7
-9
| { | ||
| "name": "@stackone/logger", | ||
| "version": "0.1.7", | ||
| "version": "0.1.8", | ||
| "description": "", | ||
| "main": "dist/index.js", | ||
| "main": "dist/index.cjs", | ||
| "module": "dist/index.mjs", | ||
| "types": "dist/index.d.ts", | ||
| "types": "dist/index.d.cts", | ||
| "files": [ | ||
@@ -15,5 +15,5 @@ "dist", | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "types": "./dist/index.d.cts", | ||
| "import": "./dist/index.mjs", | ||
| "require": "./dist/index.js" | ||
| "require": "./dist/index.cjs" | ||
| }, | ||
@@ -38,2 +38,3 @@ "./package.json": "./package.json" | ||
| "test:watch": "FORCE_COLOR=1 vitest watch --silent", | ||
| "test:typecheck": "tsc --noEmit --project tsconfig.tests.json", | ||
| "publish-release": "npm publish --access=public" | ||
@@ -45,5 +46,2 @@ }, | ||
| "dependencies": {}, | ||
| "devDependencies": { | ||
| "tsdown": "^0.12.9" | ||
| }, | ||
| "tsdown": { | ||
@@ -56,2 +54,2 @@ "dts": true, | ||
| } | ||
| } | ||
| } |
| //#region src/types.d.ts | ||
| interface ILogger { | ||
| debug({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| info({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| warning({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| error, | ||
| code, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| error?: LogError; | ||
| code?: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| error({ | ||
| category, | ||
| message, | ||
| traceId, | ||
| error, | ||
| code, | ||
| context | ||
| }: { | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| error?: LogError; | ||
| code: string; | ||
| context?: Record<string, unknown>; | ||
| }): void; | ||
| } | ||
| type LogError = Error & { | ||
| response?: { | ||
| data?: unknown; | ||
| }; | ||
| context?: Record<string, unknown>; | ||
| url?: string; | ||
| }; | ||
| declare enum LogLevel { | ||
| Trace = 0, | ||
| Debug = 1, | ||
| Info = 2, | ||
| Warning = 3, | ||
| Error = 4, | ||
| } | ||
| type Log = { | ||
| level: LogLevel; | ||
| category?: string; | ||
| message: string; | ||
| traceId?: string; | ||
| error?: LogError; | ||
| code?: string; | ||
| context?: Record<string, unknown>; | ||
| }; | ||
| //#endregion | ||
| export { ILogger, Log, LogError, LogLevel }; |
| let e=function(e){return e[e.Trace=0]=`Trace`,e[e.Debug=1]=`Debug`,e[e.Info=2]=`Info`,e[e.Warning=3]=`Warning`,e[e.Error=4]=`Error`,e}({});exports.LogLevel=e; |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
5405
0.84%0
-100%0
-100%1
Infinity%