@opengis/fastify-table 1.2.55 → 1.2.56
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 +1 -1
- package/server/plugins/logger/getLogger.js +9 -1
- package/utils.js +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pino from 'pino';
|
|
2
2
|
// import path from 'node:path';
|
|
3
3
|
|
|
4
|
-
import { config, getRedis } from '../../../utils.js';
|
|
4
|
+
import { config, getRedis, redactionList } from '../../../utils.js';
|
|
5
5
|
|
|
6
6
|
// utils
|
|
7
7
|
import getHooks from './getHooks.js';
|
|
@@ -31,11 +31,19 @@ const options = {
|
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
33
|
},
|
|
34
|
+
redact: redactionList,
|
|
34
35
|
};
|
|
35
36
|
const logger = pino(options);
|
|
37
|
+
|
|
36
38
|
logger.file = function userFile(logfolder, msg, req) {
|
|
37
39
|
logger.info({ logfolder, ...(typeof msg === 'string' ? { msg } : msg) }, req);
|
|
38
40
|
};
|
|
41
|
+
|
|
42
|
+
if (config.debug) {
|
|
43
|
+
logger.file('test/redaction', { clientId: 'should be redacted', clientSecret: 'should be redacted' });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
39
47
|
logger.metrics = function metrics(key, val, dbName) {
|
|
40
48
|
const dbname = dbName || config.pg?.database;
|
|
41
49
|
if (!dbname && !isServer) return;
|
package/utils.js
CHANGED
|
@@ -64,6 +64,7 @@ import logger from './server/plugins/logger/getLogger.js';
|
|
|
64
64
|
// utils
|
|
65
65
|
import config from './config.js';
|
|
66
66
|
import dblist from './dblist.js';
|
|
67
|
+
import redactionList from './redactionList.js';
|
|
67
68
|
import eventStream from './server/plugins/util/funcs/eventStream.js';
|
|
68
69
|
import isFileExists from './server/plugins/crud/funcs/isFileExists.js';
|
|
69
70
|
import getFolder from './server/plugins/crud/funcs/utils/getFolder.js';
|
|
@@ -77,6 +78,7 @@ export default null;
|
|
|
77
78
|
export {
|
|
78
79
|
config,
|
|
79
80
|
dblist,
|
|
81
|
+
redactionList,
|
|
80
82
|
getFolder,
|
|
81
83
|
handlebars,
|
|
82
84
|
handlebarsSync,
|