backend-common: update exports for backwards compatibility
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -15,5 +15,9 @@
|
||||
*/
|
||||
|
||||
export { getRootLogger, getVoidLogger, setRootLogger } from './globalLoggers';
|
||||
export { createRootLogger } from './createRootLogger';
|
||||
export {
|
||||
createRootLogger,
|
||||
redactWinstonLogLine,
|
||||
coloredFormat,
|
||||
} from './createRootLogger';
|
||||
export { loggerToWinstonLogger } from './loggerToWinstonLogger';
|
||||
|
||||
Reference in New Issue
Block a user