Skip to content

Commit a5c864f

Browse files
committed
add: IP logging to error handler plugin
1 parent d2e5422 commit a5c864f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/velog-server/src/common/plugins/global/errorHandlerPlugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const errorHandlerPlugin: FastifyPluginCallback = (fastify, _, done) => {
2323
query: request?.query || 'none',
2424
error,
2525
user: request?.user,
26+
ip: request?.ip,
2627
}),
2728
)
2829
.catch(console.error)
@@ -56,6 +57,7 @@ const errorHandlerPlugin: FastifyPluginCallback = (fastify, _, done) => {
5657
requestbody: request?.body,
5758
error,
5859
user: request?.user,
60+
ip: request?.ip,
5961
}),
6062
)
6163
.catch(console.error)

0 commit comments

Comments
 (0)