Skip to content

Commit

Permalink
health체크 - 로그 연속으로 오는거 막기 위한 테스트-01
Browse files Browse the repository at this point in the history
  • Loading branch information
codesejin committed Jul 24, 2023
1 parent 4ccfc08 commit c8fc37e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ export class AppController {
constructor(private readonly appService: AppService) {}

@Get()
getHello(): string {
getHello(): { statusCode: number; data: string } {
const logger = new Logger('application.app.controller')
logger.info('안녕하세요', '대문입니다.')
return this.appService.getHello();
const data = this.appService.getHello();
return { statusCode: 200, data };
}

@Get('/health')
getHealth(): { statusCode: number; data: string } {
const logger = new Logger('application.app.controller')
logger.info('Health check', '서비스 정상 동작 확인')
return { statusCode: 200, data: 'Health check passed!' };
}
}

0 comments on commit c8fc37e

Please sign in to comment.