@opengis/fastify-table 1.3.11 → 1.3.12
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/package.json
CHANGED
|
@@ -4,18 +4,11 @@ import build from 'pino-abstract-transport';
|
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
|
|
6
6
|
import labels from './labels.js';
|
|
7
|
+
import timestampWithTimeZone from './timestampWithTimeZone.js';
|
|
7
8
|
|
|
8
9
|
import config from '../../../config.js';
|
|
9
10
|
|
|
10
|
-
const generator = () => () => {
|
|
11
|
-
const date = new Date();
|
|
12
|
-
const tzOffset = date.getTimezoneOffset();
|
|
13
|
-
const currentTimeWithTimezome = date - tzOffset * 60 * 1000;
|
|
14
|
-
|
|
15
|
-
// if (!opt.interval || opt.interval === '1d') {
|
|
16
|
-
return `${new Date(currentTimeWithTimezome).toISOString().split('T')[0].replace(/:/g, '_')}.log`;
|
|
17
|
-
// }
|
|
18
|
-
};
|
|
11
|
+
const generator = () => () => `${timestampWithTimeZone().split('T')[0].replace(/:/g, '_')}.log`;
|
|
19
12
|
|
|
20
13
|
const {
|
|
21
14
|
dir = 'log', interval = '1d', compress = 'gzip', // maxFiles = 90, local: teeToStdout,
|
|
@@ -7,6 +7,7 @@ import redactionList from '../../../redactionList.js';
|
|
|
7
7
|
// utils
|
|
8
8
|
import getHooks from './getHooks.js';
|
|
9
9
|
import serializers from './serializers.js';
|
|
10
|
+
import timestampWithTimeZone from './timestampWithTimeZone.js';
|
|
10
11
|
|
|
11
12
|
const isServer = process.argv[2];
|
|
12
13
|
|
|
@@ -18,7 +19,7 @@ const level = config.log?.level || process.env.PINO_LOG_LEVEL || 'info';
|
|
|
18
19
|
console.log(`log level: ${level}`);
|
|
19
20
|
const options = {
|
|
20
21
|
level, // minimal log level to write
|
|
21
|
-
timestamp:
|
|
22
|
+
timestamp: () => `,"time":"${timestampWithTimeZone()}"`, // timestamp as isostring
|
|
22
23
|
hooks: getHooks(),
|
|
23
24
|
serializers, // custom log params
|
|
24
25
|
transport: {
|