Skip to content

Commit c79dca1

Browse files
committed
refactor: clean up debug logs
1 parent ed796a9 commit c79dca1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/modules/users/queries/get-prepared-config-with-users/get-prepared-config-with-users.handler.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export class GetPreparedConfigWithUsersHandler
3535
let config: XRayConfig | null = null;
3636
const inboundsUserSets: Map<string, HashedSet> = new Map();
3737
try {
38-
// TODO: cleanup logs
3938
const { configProfileUuid, activeInbounds } = query;
4039

4140
const configProfile = await this.queryBus.execute(
@@ -55,28 +54,19 @@ export class GetPreparedConfigWithUsersHandler
5554

5655
config.processCertificates();
5756

58-
const start = Date.now();
5957
const configHash = config.getConfigHash();
60-
this.logger.log(`Config hash: ${configHash} in ${Date.now() - start}ms`);
6158

6259
const usersStream = this.usersRepository.getUsersForConfigStream(
6360
configProfileUuid,
6461
activeInbounds,
6562
);
6663

67-
const startUserBatch = Date.now();
6864
for await (const userBatch of usersStream) {
6965
config.includeUserBatch(userBatch, inboundsUserSets);
7066
}
71-
const endUserBatch = Date.now();
72-
this.logger.log(`User batch in ${endUserBatch - startUserBatch}ms`);
7367

7468
for (const [tag, set] of inboundsUserSets) {
75-
this.logger.log(`Inbound ${tag} has ${set.size} users`);
76-
}
77-
78-
for (const [tag, set] of inboundsUserSets) {
79-
this.logger.log(`Inbound ${tag} has ${set.hash64String}...`);
69+
this.logger.debug(`Inbound ${tag}: hash ${set.hash64String} and ${set.size} users`);
8070
}
8171

8272
return {

0 commit comments

Comments
 (0)