Skip to content

Commit 36a8d7d

Browse files
authored
Merge pull request #217 from AthennaIO/develop
chore: remove trace argument
2 parents 22e5bf6 + b4efa5a commit 36a8d7d

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/http",
3-
"version": "5.31.0",
3+
"version": "5.32.0",
44
"description": "The Athenna Http server. Built on top of fastify.",
55
"license": "MIT",
66
"author": "João Lenon <lenon@athenna.io>",

src/kernels/HttpKernel.ts

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,10 @@ export class HttpKernel {
176176
/**
177177
* Register the cls-rtracer plugin in the Http server.
178178
*/
179-
public async registerRTracer(trace?: boolean): Promise<void> {
179+
public async registerRTracer(): Promise<void> {
180180
const rTracerPlugin = await Module.safeImport('cls-rtracer')
181181

182-
if (trace === false) {
183-
debug(
184-
'Not able to register rTracer plugin. Set the trace option as true in your http server options.'
185-
)
186-
187-
return
188-
}
189-
190-
if (trace === undefined && Config.is('http.rTracer.enabled', false)) {
182+
if (Config.is('http.rTracer.enabled', false)) {
191183
debug(
192184
'Not able to register rTracer plugin. Set the http.rTracer.enabled configuration as true.'
193185
)
@@ -212,18 +204,10 @@ export class HttpKernel {
212204
/**
213205
* Register the @athenna/vite plugin in the Http server.
214206
*/
215-
public async registerVite(trace?: boolean): Promise<void> {
207+
public async registerVite(): Promise<void> {
216208
const vitePlugin = await Module.safeImport('@athenna/vite/plugins/fastify')
217209

218-
if (trace === false) {
219-
debug(
220-
'Not able to register vite plugin. Set the trace option as true in your http server options.'
221-
)
222-
223-
return
224-
}
225-
226-
if (trace === undefined && Config.is('http.vite.enabled', false)) {
210+
if (Config.is('http.vite.enabled', false)) {
227211
debug(
228212
'Not able to register vite plugin. Set the http.vite.enabled configuration as true.'
229213
)
@@ -281,11 +265,11 @@ export class HttpKernel {
281265

282266
Server.terminate(ctx => {
283267
if (!isToLogRequest) {
284-
return Log.channelOrVanilla(channel).info(ctx)
268+
return Log.channelOrVanilla(channel || 'request').info(ctx)
285269
}
286270

287271
if (isToLogRequest(ctx)) {
288-
return Log.channelOrVanilla(channel).info(ctx)
272+
return Log.channelOrVanilla(channel || 'request').info(ctx)
289273
}
290274
})
291275
}

0 commit comments

Comments
 (0)