backend-common: update exports for backwards compatibility

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-11 10:14:20 +01:00
parent 2041e78c9c
commit 0fb7cc0130
2 changed files with 16 additions and 3 deletions
@@ -30,9 +30,18 @@ export const setRootLoggerRedactionList = redacter.add;
*
* @public
*/
export const redactWinstonLogLine: (
export function redactWinstonLogLine(
info: winston.Logform.TransformableInfo,
) => winston.Logform.TransformableInfo | boolean = redacter.format.transform;
): winston.Logform.TransformableInfo {
return redacter.format.transform(info) as winston.Logform.TransformableInfo;
}
/**
* Creates a pretty printed winston log formatter.
*
* @public
*/
export const coloredFormat = WinstonLogger.colorFormat();
/**
* Creates a default "root" logger. This also calls {@link setRootLogger} under
+5 -1
View File
@@ -15,5 +15,9 @@
*/
export { getRootLogger, getVoidLogger, setRootLogger } from './globalLoggers';
export { createRootLogger } from './createRootLogger';
export {
createRootLogger,
redactWinstonLogLine,
coloredFormat,
} from './createRootLogger';
export { loggerToWinstonLogger } from './loggerToWinstonLogger';