@gasket/plugin-logger
Advanced tools
Comparing version
@@ -7,8 +7,12 @@ import type { MaybeAsync, Plugin } from '@gasket/core'; | ||
export type Logger = LogMethods & { | ||
close?: () => MaybeAsync<any>; | ||
child: (meta: Record<string, any>) => Logger; | ||
}; | ||
declare module '@gasket/plugin-logger' { | ||
export interface Logger extends LogMethods { | ||
close?: () => MaybeAsync<any>; | ||
child: (meta: Record<string, any>) => Logger; | ||
} | ||
} | ||
declare module '@gasket/core' { | ||
import { Logger } from '@gasket/plugin-logger'; | ||
interface Gasket { | ||
@@ -15,0 +19,0 @@ logger: Logger; |
@@ -27,2 +27,5 @@ /* eslint-disable no-console, no-sync */ | ||
description, | ||
actions: { | ||
getLogger: gasket => gasket.logger | ||
}, | ||
hooks: { | ||
@@ -60,7 +63,2 @@ create(gasket, { pkg, gasketConfig }) { | ||
}, | ||
actions(gasket) { | ||
return { | ||
getLogger: () => gasket.logger | ||
}; | ||
}, | ||
async onSignal(gasket) { | ||
@@ -67,0 +65,0 @@ await gasket.logger?.close?.(); |
{ | ||
"name": "@gasket/plugin-logger", | ||
"version": "7.0.0-next.63", | ||
"version": "7.0.0-next.64", | ||
"description": "Gasket plugin for logging", | ||
@@ -39,5 +39,5 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@gasket/core": "7.0.0-next.63", | ||
"@gasket/plugin-https": "7.0.0-next.63", | ||
"@gasket/plugin-metadata": "7.0.0-next.63", | ||
"@gasket/core": "7.0.0-next.64", | ||
"@gasket/plugin-https": "7.0.0-next.64", | ||
"@gasket/plugin-metadata": "7.0.0-next.64", | ||
"cross-env": "^7.0.3", | ||
@@ -65,3 +65,3 @@ "eslint": "^8.56.0", | ||
}, | ||
"gitHead": "53d9d2f59b438d94d171eeac528c6aa2346c142e" | ||
"gitHead": "b372e6c7768d61d6f3327df008db95a05a489098" | ||
} |
7372
1.03%105
0.96%