feat: adds configurable logging (#4914)

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
This commit is contained in:
Piyush Gupta
2025-03-21 18:39:13 +05:30
committed by GitHub
parent 7dd5cf8b6e
commit 5527f184b7
150 changed files with 1167 additions and 292 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import * as fs from "fs";
import * as yaml from "yaml";
import { logger } from "@formbricks/logger";
// Define the v1 (now v2) client endpoints to be merged
const v1ClientEndpoints = {
@@ -314,8 +315,8 @@ const updatedOpenapiContent = yaml.stringify(openapiDoc);
// Write the updated content back to the openapi.yml file
try {
fs.writeFileSync(openapiFilePath, updatedOpenapiContent);
console.log("Merged v1 client endpoints into the generated v2 documentation.");
logger.info("Merged v1 client endpoints into the generated v2 documentation.");
} catch (error) {
console.error("Error writing to OpenAPI file:", error);
logger.error(error, "Error writing to OpenAPI file");
process.exit(1);
}