Skip to content

Commit

Permalink
Style(module-logger): formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Jan 7, 2024
1 parent fe0921e commit aeb12f4
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/module-logger/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,15 @@ const _createLogger = () => {
winston.format.json(),
winston.format.colorize({ all: true }),
winston.format.printf((info) => {
return (
`${[..._defaultKeys, ...Object.keys(info)].reduce((acc, key, i) => {
if ((_defaultKeys.includes(key) && i <= 3) || (i > 3 && !_defaultKeys.includes(key))) {
if (i > 0) acc += ", ";
return (acc += _defaultKeys.includes(key)
? `"${chalk.gray(key)}": "${info[key]}"`
: `"${chalk.gray(chalk.underline(key))}": "${chalk.underline(info[key])}"`);
}
return acc;
}, "{ ") } }`
);
return `${[..._defaultKeys, ...Object.keys(info)].reduce((acc, key, i) => {
if ((_defaultKeys.includes(key) && i <= 3) || (i > 3 && !_defaultKeys.includes(key))) {
if (i > 0) acc += ", ";
return (acc += _defaultKeys.includes(key)
? `"${chalk.gray(key)}": "${info[key]}"`
: `"${chalk.gray(chalk.underline(key))}": "${chalk.underline(info[key])}"`);
}
return acc;
}, "{ ")} }`;
})
),
transports
Expand Down

0 comments on commit aeb12f4

Please sign in to comment.