@anjianshi/utils 1.2.2 → 1.2.3
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/env-node/logging.d.ts +1 -1
- package/env-node/logging.js +1 -1
- package/package.json +1 -1
- package/src/env-node/logging.ts +3 -3
package/env-node/logging.d.ts
CHANGED
package/env-node/logging.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import fs from 'node:fs';
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
-
import chalk from 'chalk';
|
|
8
|
+
import * as chalk from 'chalk';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
10
10
|
import { logger as defaultLogger, LogLevel, LogHandler, formatters, } from '../logging/index.js';
|
|
11
11
|
export * from '../logging/index.js';
|
package/package.json
CHANGED
package/src/env-node/logging.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import fs from 'node:fs'
|
|
6
6
|
import path from 'node:path'
|
|
7
7
|
import { fileURLToPath } from 'node:url'
|
|
8
|
-
import chalk from 'chalk'
|
|
8
|
+
import * as chalk from 'chalk'
|
|
9
9
|
import dayjs from 'dayjs'
|
|
10
10
|
import {
|
|
11
11
|
logger as defaultLogger,
|
|
@@ -128,7 +128,7 @@ export class FileHandler extends LogHandler {
|
|
|
128
128
|
totalLength += itemString.length
|
|
129
129
|
} else {
|
|
130
130
|
itemStrings.push(
|
|
131
|
-
itemString.slice(0, this.options.maxLength - totalLength) + ' [too long, sliced]'
|
|
131
|
+
itemString.slice(0, this.options.maxLength - totalLength) + ' [too long, sliced]'
|
|
132
132
|
)
|
|
133
133
|
break
|
|
134
134
|
}
|
|
@@ -179,7 +179,7 @@ export class FileHandler extends LogHandler {
|
|
|
179
179
|
const { dir, filePrefix } = this.options
|
|
180
180
|
return path.join(
|
|
181
181
|
dir,
|
|
182
|
-
`${filePrefix ? `${filePrefix}-` : ''}${dayjs().format('YYYY-MM-DD')}.log
|
|
182
|
+
`${filePrefix ? `${filePrefix}-` : ''}${dayjs().format('YYYY-MM-DD')}.log`
|
|
183
183
|
)
|
|
184
184
|
}
|
|
185
185
|
|