debug: add logging to savePartialSettings for troubleshooting
This commit is contained in:
@@ -578,9 +578,21 @@ export class ConfigManager {
|
|||||||
await this.loadEnvFile()
|
await this.loadEnvFile()
|
||||||
const currentSettings = this.getAllSettings()
|
const currentSettings = this.getAllSettings()
|
||||||
|
|
||||||
|
log.info('Current settings before merge', {
|
||||||
|
erpUrl: currentSettings.erp.url,
|
||||||
|
dbType: currentSettings.database.dbType,
|
||||||
|
dbName: currentSettings.database.database
|
||||||
|
})
|
||||||
|
|
||||||
// Step 3: Deep merge - only update provided fields
|
// Step 3: Deep merge - only update provided fields
|
||||||
const mergedSettings = deepMerge(currentSettings, settings)
|
const mergedSettings = deepMerge(currentSettings, settings)
|
||||||
|
|
||||||
|
log.info('Settings after merge', {
|
||||||
|
erpUrl: mergedSettings.erp.url,
|
||||||
|
dbType: mergedSettings.database.dbType,
|
||||||
|
dbName: mergedSettings.database.database
|
||||||
|
})
|
||||||
|
|
||||||
// Step 4: Backup and save
|
// Step 4: Backup and save
|
||||||
const backupSuccess = await this.backupEnvFile()
|
const backupSuccess = await this.backupEnvFile()
|
||||||
if (!backupSuccess) {
|
if (!backupSuccess) {
|
||||||
|
|||||||
Reference in New Issue
Block a user