feat(logging): renamed redactLogLine function to redactWinstonLogLine

Signed-off-by: Diego Bardari <diego.bardari@klarna.com>
This commit is contained in:
Diego Bardari
2022-07-28 11:56:07 +02:00
parent a01168b466
commit ef4fd4abd1
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/backend-common': patch
---
Exported `redactLogLine` function to be able to use it in custom loggers.
Exported `redactLogLine` function to be able to use it in custom loggers and renamed it to `redactWinstonLogLine`.
+1 -1
View File
@@ -569,7 +569,7 @@ export type ReadUrlResponseFactoryFromStreamOptions = {
};
// @public
export function redactLogLine(
export function redactWinstonLogLine(
info: winston.Logform.TransformableInfo,
): winston.Logform.TransformableInfo;
+1 -1
View File
@@ -19,6 +19,6 @@ export {
createRootLogger,
getRootLogger,
setRootLogger,
redactLogLine,
redactWinstonLogLine,
} from './rootLogger';
export * from './voidLogger';
@@ -72,7 +72,7 @@ export function setRootLoggerRedactionList(redactionList: string[]) {
*
* @public
*/
export function redactLogLine(info: winston.Logform.TransformableInfo) {
export function redactWinstonLogLine(info: winston.Logform.TransformableInfo) {
// TODO(hhogg): The logger is created before the config is loaded, because the
// logger is needed in the config loader. There is a risk of a secret being
// logged out during the config loading stage.
@@ -106,7 +106,7 @@ export function createRootLogger(
{
level: env.LOG_LEVEL || 'info',
format: winston.format.combine(
winston.format(redactLogLine)(),
winston.format(redactWinstonLogLine)(),
env.NODE_ENV === 'production' ? winston.format.json() : coloredFormat,
),
defaultMeta: {