Merge pull request #597 from devchat-ai/feat/add-logging-for-local-service-port

feat: Add logging for local service port
This commit is contained in:
boob.yang 2024-11-26 14:01:43 +08:00 committed by GitHub
commit 17f7a28f35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,6 +155,7 @@ export class DevChatClient {
logger.channel()?.info("No local service port found.");
throw new DCLocalServicePortNotSetError();
}
logger.channel()?.trace("Using local service port:", process.env.DC_LOCALSERVICE_PORT);
const port: number = parseInt(process.env.DC_LOCALSERVICE_PORT || '8008', 10);
this.baseURL = `http://localhost:${port}`;
}
@ -174,6 +175,7 @@ export class DevChatClient {
logger.channel()?.info("No local service port found.");
throw new DCLocalServicePortNotSetError();
}
logger.channel()?.trace("Using local service port:", process.env.DC_LOCALSERVICE_PORT);
const port: number = parseInt(process.env.DC_LOCALSERVICE_PORT || '8008', 10);
this.baseURL = `http://localhost:${port}`;
}
@ -251,6 +253,7 @@ export class DevChatClient {
if (!process.env.DC_LOCALSERVICE_PORT) {
logger.channel()?.info("No local service port found.");
}
logger.channel()?.trace("Using local service port:", process.env.DC_LOCALSERVICE_PORT);
const port: number = parseInt(process.env.DC_LOCALSERVICE_PORT || '8008', 10);
this.baseURL = `http://localhost:${port}`;
}