Skip to content

Commit 7058886

Browse files
committed
refactor: Update logging level from debug to info for status checks in StatusAPI and InfrastructureStatus classes
1 parent 9d52321 commit 7058886

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎Common/Server/API/StatusAPI.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class StatusAPI {
127127
res: ExpressResponse,
128128
): Promise<void> {
129129
try {
130-
logger.debug("Ready check");
130+
logger.info("Ready check: Init");
131131
await options.readyCheck();
132132
logger.info("Ready check: ok");
133133
stausReadySuccess.add(1);
@@ -136,6 +136,9 @@ export default class StatusAPI {
136136
status: "ok",
137137
});
138138
} catch (e) {
139+
logger.error("Ready check: failed");
140+
logger.error(e);
141+
139142
stausReadyFailed.add(1);
140143
Response.sendErrorResponse(
141144
req,
@@ -154,7 +157,7 @@ export default class StatusAPI {
154157
res: ExpressResponse,
155158
): Promise<void> {
156159
try {
157-
logger.debug("Live check");
160+
logger.info("Live check: Init");
158161
await options.liveCheck();
159162
logger.info("Live check: ok");
160163
stausLiveSuccess.add(1);
@@ -163,6 +166,8 @@ export default class StatusAPI {
163166
status: "ok",
164167
});
165168
} catch (e) {
169+
logger.error("Live check: failed");
170+
logger.error(e);
166171
stausLiveFailed.add(1);
167172
Response.sendErrorResponse(
168173
req,

‎Common/Server/Infrastructure/Status.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,33 @@ export default class InfrastructureStatus {
1414
checkPostgresStatus: boolean;
1515
checkClickhouseStatus: boolean;
1616
}): Promise<void> {
17-
logger.debug("Checking infrastructure status");
17+
logger.info("Checking infrastructure status");
1818

1919
if (data.checkRedisStatus) {
20-
logger.debug("Checking Redis status");
20+
logger.info("Checking Redis status");
2121
if (!(await Redis.checkConnnectionStatus())) {
22-
logger.debug("Redis is not connected");
22+
logger.info("Redis is not connected");
2323
throw new DatabaseNotConnectedException("Redis is not connected");
2424
}
25-
logger.debug("Redis is connected");
25+
logger.info("Redis is connected");
2626
}
2727

2828
if (data.checkPostgresStatus) {
29-
logger.debug("Checking Postgres status");
29+
logger.info("Checking Postgres status");
3030
if (!(await PostgresAppInstance.checkConnnectionStatus())) {
31-
logger.debug("Postgres is not connected");
31+
logger.info("Postgres is not connected");
3232
throw new DatabaseNotConnectedException("Postgres is not connected");
3333
}
34-
logger.debug("Postgres is connected");
34+
logger.info("Postgres is connected");
3535
}
3636

3737
if (data.checkClickhouseStatus) {
38-
logger.debug("Checking Clickhouse status");
38+
logger.info("Checking Clickhouse status");
3939
if (!(await ClickhouseAppInstance.checkConnnectionStatus())) {
40-
logger.debug("Clickhouse is not connected");
40+
logger.info("Clickhouse is not connected");
4141
throw new DatabaseNotConnectedException("Clickhouse is not connected");
4242
}
43-
logger.debug("Clickhouse is connected");
43+
logger.info("Clickhouse is connected");
4444
}
4545
}
4646

0 commit comments

Comments
 (0)