Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRMS-156 [Fix] 일부 Logging 안 되는 문제 수정 및 개선 #65

Merged
merged 9 commits into from
Apr 21, 2024
Prev Previous commit
Next Next commit
fix: 로그 표시 수정
  • Loading branch information
jinyongp committed Apr 21, 2024
commit 907584ee5b237535eeff288910641376c346fe24
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ import { PrismaModule } from '@/prisma';
case 'test':
return false;
case 'local':
// return true;
return false;
case 'dev':
return true;
case 'prod':
if (
[
Expand Down
3 changes: 3 additions & 0 deletions src/modules/event/event.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class EventController {

@Get('connect')
async connect(@Query('connectionId') connectionId: string): Promise<EventResponse> {
console.log(`$connect (connectionId: ${connectionId})`);
this.logger.debug(`Creating connection: ${connectionId}`);
const response = await this.event.get('connect').handle(connectionId);
const connections = await this.event.connection.getConnections();
Expand All @@ -39,6 +40,7 @@ export class EventController {

@Get('disconnect')
async disconnect(@Query('connectionId') connectionId: string): Promise<EventResponse> {
console.log(`$disconnect (connectionId: ${connectionId})`);
this.logger.debug(`Deleting connection: ${connectionId}`);
const response = await this.event.get('disconnect').handle(connectionId);
const connections = await this.event.connection.getConnections();
Expand All @@ -52,6 +54,7 @@ export class EventController {
@Query('connectionId') connectionId: string,
@ParsedBody() body: PingEvent.Payload
): Promise<EventResponse> {
console.log(`$default (connectionId: ${connectionId})`);
const handler = this.event.get('ping');
this.logger.debug(`Sending message from connection: ${connectionId}`);
handler.on('send', async (connection, data) => {
Expand Down