Skip to content

Commit 50032fb

Browse files
committed
feat: add traceContextService to LoggerService instantiation
1 parent 52bf42a commit 50032fb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/nestjs-logger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@
7676
"publishConfig": {
7777
"access": "public"
7878
}
79-
}
79+
}

packages/nestjs-logger/src/core/logger.module.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,27 @@ export class LoggerModule
146146
formatterFactory: FormatterFactory,
147147
writer: ConsoleWriter,
148148
contextResolver: ContextResolver,
149+
traceContextService,
149150
) => {
150151
const formatter = formatterFactory.create(config.format, {
151152
colors: config.colors,
152153
timestamp: config.timestamp,
153154
context: config.context,
154155
});
155-
return new LoggerService(config, formatter, writer, contextResolver);
156+
return new LoggerService(
157+
config,
158+
formatter,
159+
writer,
160+
contextResolver,
161+
traceContextService
162+
);
156163
},
157164
inject: [
158165
LOGGER_CONFIG_TOKEN,
159166
FormatterFactory,
160167
ConsoleWriter,
161168
ContextResolver,
169+
TraceContextService,
162170
],
163171
},
164172
{

0 commit comments

Comments
 (0)