2020-04-22 15:52:17 +02:00
|
|
|
import {v4 as uuid} from "uuid";
|
2020-11-02 17:48:52 +01:00
|
|
|
import {Logger as TsLogger} from "tslog";
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-11-02 17:48:52 +01:00
|
|
|
export const log = new TsLogger();
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-11-02 17:48:52 +01:00
|
|
|
export function makeUniqueLogger(): TsLogger {
|
|
|
|
const id = uuid();
|
|
|
|
return log.getChildLogger({
|
|
|
|
requestId: id,
|
|
|
|
});
|
2020-04-22 15:52:17 +02:00
|
|
|
}
|