@kubun/logger 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -1
- package/lib/index.js +20 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Config, ConsoleSinkOptions, Logger } from '@
|
|
1
|
+
import type { Config, ConsoleSinkOptions, Logger } from '@sozai/log';
|
|
2
2
|
export type { Logger };
|
|
3
3
|
export declare function getKubunLogger(namespace: string, properties?: Record<string, unknown>): Logger;
|
|
4
4
|
export declare function getDefaultConfig(options?: ConsoleSinkOptions): Config<'console', never>;
|
package/lib/index.js
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
|
-
import{getDefaultConfig as
|
|
1
|
+
import { getDefaultConfig as getEnkakuConfig, getLogger } from '@sozai/log';
|
|
2
|
+
export function getKubunLogger(namespace, properties) {
|
|
3
|
+
return getLogger([
|
|
4
|
+
'kubun',
|
|
5
|
+
namespace
|
|
6
|
+
], properties);
|
|
7
|
+
}
|
|
8
|
+
export function getDefaultConfig(options) {
|
|
9
|
+
const config = getEnkakuConfig(options);
|
|
10
|
+
config.loggers.push({
|
|
11
|
+
category: [
|
|
12
|
+
'kubun'
|
|
13
|
+
],
|
|
14
|
+
lowestLevel: 'error',
|
|
15
|
+
sinks: [
|
|
16
|
+
'console'
|
|
17
|
+
]
|
|
18
|
+
});
|
|
19
|
+
return config;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/logger",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"license": "see LICENSE.md",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"type": "module",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
],
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@
|
|
18
|
+
"@sozai/log": "^0.1.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build:clean": "del lib",
|
|
22
|
-
"build:js": "swc src -d ./lib --config-file ../../swc.json --strip-leading-paths",
|
|
22
|
+
"build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
|
|
23
23
|
"build:types": "tsc --emitDeclarationOnly --skipLibCheck",
|
|
24
24
|
"build:types:ci": "tsc --emitDeclarationOnly --declarationMap false",
|
|
25
25
|
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
|