@strapi/logger 5.42.1 → 5.44.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/dist/configs/output-file-configuration.d.ts +5 -1
- package/dist/configs/output-file-configuration.d.ts.map +1 -1
- package/dist/configs/output-file-configuration.js +5 -2
- package/dist/configs/output-file-configuration.js.map +1 -1
- package/dist/configs/output-file-configuration.mjs +6 -3
- package/dist/configs/output-file-configuration.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { transports, LoggerOptions } from 'winston';
|
|
2
|
-
|
|
2
|
+
export type OutputFileLoggerOptions = {
|
|
3
|
+
/** Console only: omit noisy `info` when e.g. `warn` (file transport still uses `fileTransportOptions.level`). */
|
|
4
|
+
consoleLevel?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: (filename: string, fileTransportOptions?: transports.FileTransportOptions, options?: OutputFileLoggerOptions) => LoggerOptions;
|
|
3
7
|
export default _default;
|
|
4
8
|
//# sourceMappingURL=output-file-configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-file-configuration.d.ts","sourceRoot":"","sources":["../../src/configs/output-file-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"output-file-configuration.d.ts","sourceRoot":"","sources":["../../src/configs/output-file-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAKpD,MAAM,MAAM,uBAAuB,GAAG;IACpC,iHAAiH;IACjH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;mCAGU,MAAM,yBACM,WAAW,oBAAoB,YAC3C,uBAAuB,KAChC,aAAa;AAJhB,wBAuBE"}
|
|
@@ -6,13 +6,16 @@ var prettyPrint = require('../formats/pretty-print.js');
|
|
|
6
6
|
var excludeColors = require('../formats/exclude-colors.js');
|
|
7
7
|
require('../formats/detailed-log.js');
|
|
8
8
|
|
|
9
|
-
var outputFileConfiguration = ((filename, fileTransportOptions = {})=>{
|
|
9
|
+
var outputFileConfiguration = ((filename, fileTransportOptions = {}, options)=>{
|
|
10
|
+
const consoleLevel = options?.consoleLevel ?? constants.LEVEL_LABEL;
|
|
10
11
|
return {
|
|
11
12
|
level: constants.LEVEL_LABEL,
|
|
12
13
|
levels: constants.LEVELS,
|
|
13
14
|
format: prettyPrint(),
|
|
14
15
|
transports: [
|
|
15
|
-
new winston.transports.Console(
|
|
16
|
+
new winston.transports.Console({
|
|
17
|
+
level: consoleLevel
|
|
18
|
+
}),
|
|
16
19
|
new winston.transports.File({
|
|
17
20
|
level: 'error',
|
|
18
21
|
filename,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-file-configuration.js","sources":["../../src/configs/output-file-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\n\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint, excludeColors } from '../formats';\n\nexport default (\n filename: string,\n fileTransportOptions: transports.FileTransportOptions = {}\n): LoggerOptions => {\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [\n new transports.Console(),\n new transports.File({\n level: 'error',\n filename,\n format: excludeColors,\n ...fileTransportOptions,\n }),\n ],\n };\n};\n"],"names":["filename","fileTransportOptions","
|
|
1
|
+
{"version":3,"file":"output-file-configuration.js","sources":["../../src/configs/output-file-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\n\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint, excludeColors } from '../formats';\n\nexport type OutputFileLoggerOptions = {\n /** Console only: omit noisy `info` when e.g. `warn` (file transport still uses `fileTransportOptions.level`). */\n consoleLevel?: string;\n};\n\nexport default (\n filename: string,\n fileTransportOptions: transports.FileTransportOptions = {},\n options?: OutputFileLoggerOptions\n): LoggerOptions => {\n const consoleLevel = options?.consoleLevel ?? LEVEL_LABEL;\n\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [\n new transports.Console({\n level: consoleLevel,\n }),\n new transports.File({\n level: 'error',\n filename,\n format: excludeColors,\n ...fileTransportOptions,\n }),\n ],\n };\n};\n"],"names":["filename","fileTransportOptions","options","consoleLevel","LEVEL_LABEL","level","levels","LEVELS","format","prettyPrint","transports","Console","File","excludeColors"],"mappings":";;;;;;;;AAUA,8BAAe,CAAA,CACbA,QAAAA,EACAC,oBAAAA,GAAwD,EAAE,EAC1DC,OAAAA,GAAAA;IAEA,MAAMC,YAAAA,GAAeD,SAASC,YAAAA,IAAgBC,qBAAAA;IAE9C,OAAO;QACLC,KAAAA,EAAOD,qBAAAA;QACPE,MAAAA,EAAQC,gBAAAA;QACRC,MAAAA,EAAQC,WAAAA,EAAAA;QACRC,UAAAA,EAAY;YACV,IAAIA,kBAAAA,CAAWC,OAAO,CAAC;gBACrBN,KAAAA,EAAOF;AACT,aAAA,CAAA;YACA,IAAIO,kBAAAA,CAAWE,IAAI,CAAC;gBAClBP,KAAAA,EAAO,OAAA;AACPL,gBAAAA,QAAAA;gBACAQ,MAAAA,EAAQK,aAAAA;AACR,gBAAA,GAAGZ;AACL,aAAA;AACD;AACH,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { transports } from 'winston';
|
|
2
|
-
import {
|
|
2
|
+
import { LEVEL_LABEL, LEVELS } from '../constants.mjs';
|
|
3
3
|
import prettyPrint from '../formats/pretty-print.mjs';
|
|
4
4
|
import excludeColors from '../formats/exclude-colors.mjs';
|
|
5
5
|
import '../formats/detailed-log.mjs';
|
|
6
6
|
|
|
7
|
-
var outputFileConfiguration = ((filename, fileTransportOptions = {})=>{
|
|
7
|
+
var outputFileConfiguration = ((filename, fileTransportOptions = {}, options)=>{
|
|
8
|
+
const consoleLevel = options?.consoleLevel ?? LEVEL_LABEL;
|
|
8
9
|
return {
|
|
9
10
|
level: LEVEL_LABEL,
|
|
10
11
|
levels: LEVELS,
|
|
11
12
|
format: prettyPrint(),
|
|
12
13
|
transports: [
|
|
13
|
-
new transports.Console(
|
|
14
|
+
new transports.Console({
|
|
15
|
+
level: consoleLevel
|
|
16
|
+
}),
|
|
14
17
|
new transports.File({
|
|
15
18
|
level: 'error',
|
|
16
19
|
filename,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-file-configuration.mjs","sources":["../../src/configs/output-file-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\n\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint, excludeColors } from '../formats';\n\nexport default (\n filename: string,\n fileTransportOptions: transports.FileTransportOptions = {}\n): LoggerOptions => {\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [\n new transports.Console(),\n new transports.File({\n level: 'error',\n filename,\n format: excludeColors,\n ...fileTransportOptions,\n }),\n ],\n };\n};\n"],"names":["filename","fileTransportOptions","
|
|
1
|
+
{"version":3,"file":"output-file-configuration.mjs","sources":["../../src/configs/output-file-configuration.ts"],"sourcesContent":["import { transports, LoggerOptions } from 'winston';\n\nimport { LEVEL_LABEL, LEVELS } from '../constants';\nimport { prettyPrint, excludeColors } from '../formats';\n\nexport type OutputFileLoggerOptions = {\n /** Console only: omit noisy `info` when e.g. `warn` (file transport still uses `fileTransportOptions.level`). */\n consoleLevel?: string;\n};\n\nexport default (\n filename: string,\n fileTransportOptions: transports.FileTransportOptions = {},\n options?: OutputFileLoggerOptions\n): LoggerOptions => {\n const consoleLevel = options?.consoleLevel ?? LEVEL_LABEL;\n\n return {\n level: LEVEL_LABEL,\n levels: LEVELS,\n format: prettyPrint(),\n transports: [\n new transports.Console({\n level: consoleLevel,\n }),\n new transports.File({\n level: 'error',\n filename,\n format: excludeColors,\n ...fileTransportOptions,\n }),\n ],\n };\n};\n"],"names":["filename","fileTransportOptions","options","consoleLevel","LEVEL_LABEL","level","levels","LEVELS","format","prettyPrint","transports","Console","File","excludeColors"],"mappings":";;;;;;AAUA,8BAAe,CAAA,CACbA,QAAAA,EACAC,oBAAAA,GAAwD,EAAE,EAC1DC,OAAAA,GAAAA;IAEA,MAAMC,YAAAA,GAAeD,SAASC,YAAAA,IAAgBC,WAAAA;IAE9C,OAAO;QACLC,KAAAA,EAAOD,WAAAA;QACPE,MAAAA,EAAQC,MAAAA;QACRC,MAAAA,EAAQC,WAAAA,EAAAA;QACRC,UAAAA,EAAY;YACV,IAAIA,UAAAA,CAAWC,OAAO,CAAC;gBACrBN,KAAAA,EAAOF;AACT,aAAA,CAAA;YACA,IAAIO,UAAAA,CAAWE,IAAI,CAAC;gBAClBP,KAAAA,EAAO,OAAA;AACPL,gBAAAA,QAAAA;gBACAQ,MAAAA,EAAQK,aAAAA;AACR,gBAAA,GAAGZ;AACL,aAAA;AACD;AACH,KAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/logger",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.44.0",
|
|
4
4
|
"description": "Strapi's logger",
|
|
5
5
|
"homepage": "https://strapi.io",
|
|
6
6
|
"bugs": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"winston": "3.10.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"eslint-config-custom": "5.
|
|
49
|
-
"tsconfig": "5.
|
|
48
|
+
"eslint-config-custom": "5.44.0",
|
|
49
|
+
"tsconfig": "5.44.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=20.0.0 <=24.x.x",
|