abuse monkeypatching for AppendLogCtx

This commit is contained in:
zkldi
2021-04-25 01:51:27 +01:00
parent 21ce661bf3
commit 7125bdf301
+9 -2
View File
@@ -154,10 +154,17 @@ export function CreateScoreLogger(
importID: string,
importType: ImportTypes
) {
return rootLogger.child({
const meta = {
context: ["Score Import", importType, FormatUserDoc(user)],
importID,
});
};
// used so appendLogCtx works
const childLogger = rootLogger.child(meta);
childLogger.defaultMeta = meta;
return childLogger;
}
export const Transports = tports;