add log warnings about legacy env vars

This commit is contained in:
Alex Holliday committed 2026-07-13 09:48:02 -07:00
1 parent c1bcd9b206
commit 800080fd06
1 file changed
+9
+9
View File
@@ -69,6 +69,15 @@ export const validateEnv = (logger: ILogger): ValidatedEnv => {
process.exit(1);
}
const legacyClientVars = Object.keys(process.env).filter((key) => key.startsWith("UPTIME_APP_"));
if (legacyClientVars.length > 0) {
logger.warn({
message: `${legacyClientVars.join(", ")} no longer configure the client and will be ignored. The client defaults to the origin it is served from; to override, use CLIENT_CONFIG_API_BASE_URL, CLIENT_CONFIG_CLIENT_HOST, or CLIENT_CONFIG_LOG_LEVEL.`,
method: "validateEnv",
service: "Server",
});
}
logger.info({
message: "Environment variables validated successfully",
method: "validateEnv",