mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-23 21:59:28 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user