feat: Add logging for local service port
- Add trace logging for local service port in DevChatClient - Implement logging in three methods: constructor, reset, and setLocalServicePort - Enhance debugging capabilities for local service connections
This commit is contained in:
parent
d60291e476
commit
fca2800097
@ -155,6 +155,7 @@ export class DevChatClient {
|
|||||||
logger.channel()?.info("No local service port found.");
|
logger.channel()?.info("No local service port found.");
|
||||||
throw new DCLocalServicePortNotSetError();
|
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);
|
const port: number = parseInt(process.env.DC_LOCALSERVICE_PORT || '8008', 10);
|
||||||
this.baseURL = `http://localhost:${port}`;
|
this.baseURL = `http://localhost:${port}`;
|
||||||
}
|
}
|
||||||
@ -174,6 +175,7 @@ export class DevChatClient {
|
|||||||
logger.channel()?.info("No local service port found.");
|
logger.channel()?.info("No local service port found.");
|
||||||
throw new DCLocalServicePortNotSetError();
|
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);
|
const port: number = parseInt(process.env.DC_LOCALSERVICE_PORT || '8008', 10);
|
||||||
this.baseURL = `http://localhost:${port}`;
|
this.baseURL = `http://localhost:${port}`;
|
||||||
}
|
}
|
||||||
@ -251,6 +253,7 @@ export class DevChatClient {
|
|||||||
if (!process.env.DC_LOCALSERVICE_PORT) {
|
if (!process.env.DC_LOCALSERVICE_PORT) {
|
||||||
logger.channel()?.info("No local service port found.");
|
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);
|
const port: number = parseInt(process.env.DC_LOCALSERVICE_PORT || '8008', 10);
|
||||||
this.baseURL = `http://localhost:${port}`;
|
this.baseURL = `http://localhost:${port}`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user