Skip to content

Commit 2d1436b

Browse files
committed
feat(http): Logging
1 parent 57adec8 commit 2d1436b

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

host/registry.ts

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export function registerHttpHandler(
133133
configOrHandler: HandlerConfiguration | Handler,
134134
fn?: Handler,
135135
): void {
136+
console.log(`Register handler: ${method} /${path}`)
136137
if (typeof configOrHandler === 'function') {
137138
httpHostRegistry(getMetadata(), undefined, method, path, configOrHandler)
138139
} else {

http.ts

-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export function get(
4040
configOrHandler: HttpHandlerConfiguration | Handler,
4141
fn?: Handler,
4242
): void {
43-
console.log('Register GET handler', path)
4443
registerHttpHandler('GET', path, configOrHandler, fn)
4544
}
4645
export function post(path: string, fn: Handler): void
@@ -50,7 +49,6 @@ export function post(
5049
configOrHandler: HttpHandlerConfiguration | Handler,
5150
fn?: Handler,
5251
): void {
53-
console.log('Register POST handler', path)
5452
registerHttpHandler('POST', path, configOrHandler, fn)
5553
}
5654
export function put(path: string, fn: Handler): void
@@ -60,7 +58,6 @@ export function put(
6058
configOrHandler: HttpHandlerConfiguration | Handler,
6159
fn?: Handler,
6260
): void {
63-
console.log('Register PUT handler', path)
6461
registerHttpHandler('PUT', path, configOrHandler, fn)
6562
}
6663
export function patch(path: string, fn: Handler): void
@@ -70,7 +67,6 @@ export function patch(
7067
configOrHandler: HttpHandlerConfiguration | Handler,
7168
fn?: Handler,
7269
): void {
73-
console.log('Register PATCH handler', path)
7470
registerHttpHandler('PATCH', path, configOrHandler, fn)
7571
}
7672
export function del(path: string, fn: Handler): void
@@ -80,6 +76,5 @@ export function del(
8076
configOrHandler: HttpHandlerConfiguration | Handler,
8177
fn?: Handler,
8278
): void {
83-
console.log('Register DELETE handler', path)
8479
registerHttpHandler('DELETE', path, configOrHandler, fn)
8580
}

0 commit comments

Comments
 (0)