Skip to content

Commit

Permalink
Merge pull request #5831 from rmansoor/master
Browse files Browse the repository at this point in the history
[BISERVER-15169] Adding debug logging to backup and restore process
  • Loading branch information
rmansoor authored Jan 30, 2025
2 parents 2cb4f2c + 507b620 commit 7b5a897
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

Expand Down Expand Up @@ -863,13 +864,20 @@ private void performRestore() throws ParseException {
logResponseMessage( logFile, filePath, response, RequestType.RESTORE );
response.close();
}
} catch ( NoSuchFileException nsfe ) {
String message = Messages.getInstance().getErrorString( "CommandLineProcessor.ERROR_0010_FILE_DOES_NOT_EXIST", nsfe.getMessage() );
System.err.println( message );
log.error( message );
writeToFile( message, logFile );
} catch ( Exception e ) {
System.err.println( e.getMessage() );
log.error( e.getMessage() );
writeToFile( e.getMessage(), logFile );
} finally {
// cleanup the jersey resources
client.destroy();
if( client != null ) {
client.destroy();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ CommandLineProcessor.ERROR_0006_NON_ADMIN_CREDENTIALS=Non admin credentials ente
CommandLineProcessor.ERROR_0007_FORBIDDEN=User is not allowed to perform this operation: {0}
CommandLineProcessor.ERROR_0008_INVALID_PARAMETER=Invalid parameter syntax: "{0}"
CommandLineProcessor.ERROR_0009_INVALID_LOG_FILE_PATH=Invalid log file path: "{0}"
CommandLineProcessor.ERROR_0010_FILE_DOES_NOT_EXIST=File does not exist: "{0}"

CommandLineProcessor.INFO_OPTION_HELP_DESCRIPTION=print this message
CommandLineProcessor.INFO_OPTION_IMPORT_DESCRIPTION=import
Expand Down Expand Up @@ -375,7 +376,7 @@ PentahoPlatformExporter.INFO_START_EXPORT_METASTORE=****************************
PentahoPlatformExporter.INFO_END_EXPORT_METASTORE=********************************* [ End: Backup Metastore ] *******************************
PentahoPlatformExporter.INFO_SUCCESSFUL_EXPORT_METASTORE=Finished adding the metastore to the backup manifest
PentahoPlatformExporter.INFO_START_EXPORT_MONDRIAN_DATASOURCE=********************************* [ Start: Backup Mondrian DataSource(s) ] *******************************
PentahoPlatformExporter.INFO_COUNT_MONDRIAN_DATASOURCE_TO_EXPORT=Found [ {0} ] Role(s) to backup
PentahoPlatformExporter.INFO_COUNT_MONDRIAN_DATASOURCE_TO_EXPORT=Found [ {0} ] Mondrian DataSource(s) to backup
PentahoPlatformExporter.INFO_SUCCESSFUL_MONDRIAN_DATASOURCE_EXPORT_COUNT=Successfully perform backup of [ {0} ] out of [ {1} ] Mondrian datasource(s)
PentahoPlatformExporter.ERROR_MONDRIAN_DATASOURCE_EXPORT=Error performing backup of Mondrian DataSource. Cause [ {0} ]
PentahoPlatformExporter.INFO_END_EXPORT_MONDRIAN_DATASOURCE=********************************* [ End: Backup Mondrian DataSource(s) ] *******************************
Expand Down

0 comments on commit 7b5a897

Please sign in to comment.