You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/10/31 11:37:57 UTC

svn commit: r1537433 [1/6] - in /openoffice/trunk/main/solenv/bin: ./ modules/installer/ modules/installer/windows/

Author: af
Date: Thu Oct 31 10:37:56 2013
New Revision: 1537433

URL: http://svn.apache.org/r1537433
Log:
123595: Cleanup logging in make_installer.pl and its modules.

Modified:
    openoffice/trunk/main/solenv/bin/make_installer.pl
    openoffice/trunk/main/solenv/bin/modules/installer/archivefiles.pm
    openoffice/trunk/main/solenv/bin/modules/installer/configuration.pm
    openoffice/trunk/main/solenv/bin/modules/installer/control.pm
    openoffice/trunk/main/solenv/bin/modules/installer/download.pm
    openoffice/trunk/main/solenv/bin/modules/installer/downloadsigner.pm
    openoffice/trunk/main/solenv/bin/modules/installer/environment.pm
    openoffice/trunk/main/solenv/bin/modules/installer/epmfile.pm
    openoffice/trunk/main/solenv/bin/modules/installer/exiter.pm
    openoffice/trunk/main/solenv/bin/modules/installer/files.pm
    openoffice/trunk/main/solenv/bin/modules/installer/followme.pm
    openoffice/trunk/main/solenv/bin/modules/installer/globals.pm
    openoffice/trunk/main/solenv/bin/modules/installer/javainstaller.pm
    openoffice/trunk/main/solenv/bin/modules/installer/languagepack.pm
    openoffice/trunk/main/solenv/bin/modules/installer/logger.pm
    openoffice/trunk/main/solenv/bin/modules/installer/packagelist.pm
    openoffice/trunk/main/solenv/bin/modules/installer/packagepool.pm
    openoffice/trunk/main/solenv/bin/modules/installer/parameter.pm
    openoffice/trunk/main/solenv/bin/modules/installer/profiles.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scppatchsoname.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm
    openoffice/trunk/main/solenv/bin/modules/installer/setupscript.pm
    openoffice/trunk/main/solenv/bin/modules/installer/simplepackage.pm
    openoffice/trunk/main/solenv/bin/modules/installer/strip.pm
    openoffice/trunk/main/solenv/bin/modules/installer/substfilenamefiles.pm
    openoffice/trunk/main/solenv/bin/modules/installer/systemactions.pm
    openoffice/trunk/main/solenv/bin/modules/installer/upx.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/admin.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/assembly.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/binary.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/createfolder.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/feature.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/featurecomponent.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/file.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/font.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/icon.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/idtglobal.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/inifile.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/java.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/media.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/mergemodule.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/msp.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/patch.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/property.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/registry.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/removefile.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/selfreg.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/shortcut.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/sign.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/strip.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/update.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/upgrade.pm
    openoffice/trunk/main/solenv/bin/modules/installer/worker.pm
    openoffice/trunk/main/solenv/bin/modules/installer/xpdinstaller.pm
    openoffice/trunk/main/solenv/bin/modules/installer/ziplist.pm

Modified: openoffice/trunk/main/solenv/bin/make_installer.pl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/make_installer.pl?rev=1537433&r1=1537432&r2=1537433&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/make_installer.pl (original)
+++ openoffice/trunk/main/solenv/bin/make_installer.pl Thu Oct 31 10:37:56 2013
@@ -103,13 +103,18 @@ use installer::ziplist;
 #################################################
 
 installer::logger::starttime();
+$installer::logger::Global->add_timestamp("starting logging");
+
+# While there is no language set and logger::Lang is not yet tied to a log file,
+# forward its output to logger::Global.
+$installer::logger::Lang->set_forward($installer::logger::Global);
 
 #########################################
 # Checking the environment and setting
 # most important variables
 #########################################
 
-installer::logger::print_message( "... checking environment variables ...\n" );
+$installer::logger::Info->print( "... checking environment variables ...\n" );
 my $environmentvariableshashref = installer::control::check_system_environment();
 
 installer::environment::set_global_environment_variables($environmentvariableshashref);
@@ -153,7 +158,7 @@ my $current_install_number = "";
 # Checking the system requirements
 ######################################
 
-installer::logger::print_message( "... checking required files ...\n" );
+$installer::logger::Info->print( "... checking required files ...\n" );
 installer::control::check_system_path();
 
 my $pathvariableshashref = installer::environment::create_pathvariables($environmentvariableshashref);
@@ -172,7 +177,7 @@ installer::logger::globallog("zip list f
 
 my $ziplistref = installer::files::read_file($installer::globals::ziplistname);
 
-installer::logger::print_message( "... analyzing $installer::globals::ziplistname ... \n" );
+$installer::logger::Info->print( "... analyzing $installer::globals::ziplistname ... \n" );
 
 my ($productblockref, $parent) = installer::ziplist::getproductblock($ziplistref, $installer::globals::product, 1);		# product block from zip.lst
 if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . "productblock.log" ,$productblockref); }
@@ -361,7 +366,7 @@ if ($installer::globals::setupscript_def
 
 installer::logger::globallog("setup script file: $installer::globals::setupscriptname");
 
-installer::logger::print_message( "... analyzing script: $installer::globals::setupscriptname ... \n" );
+$installer::logger::Info->print( "... analyzing script: $installer::globals::setupscriptname ... \n" );
 
 my $setupscriptref = installer::files::read_file($installer::globals::setupscriptname); # Reading the setup script file
 
@@ -406,7 +411,7 @@ if ( $installer::globals::globallogging 
 
 installer::logger::log_hashref($allvariableshashref);
 
-installer::logger::print_message( "... analyzing directories ... \n" );
+$installer::logger::Info->print( "... analyzing directories ... \n" );
 
 # Collect all directories in the script to get the destination dirs
 
@@ -426,7 +431,7 @@ if ( $installer::globals::globallogging 
 installer::scriptitems::resolve_all_directory_names($dirsinproductarrayref);
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories2.log", $dirsinproductarrayref); }
 
-installer::logger::print_message( "... analyzing files ... \n" );
+$installer::logger::Info->print( "... analyzing files ... \n" );
 
 my $filesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "File");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles1.log", $filesinproductarrayref); }
@@ -470,7 +475,7 @@ if (( $installer::globals::packageformat
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2cc.log", $filesinproductarrayref); }
 }
 
-installer::logger::print_message( "... analyzing scpactions ... \n" );
+$installer::logger::Info->print( "... analyzing scpactions ... \n" );
 
 my $scpactionsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "ScpAction");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1.log", $scpactionsinproductarrayref); }
@@ -492,12 +497,12 @@ if ( $installer::globals::globallogging 
 installer::scriptitems::change_keys_of_scpactions($scpactionsinproductarrayref);
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions2.log", $scpactionsinproductarrayref); }
 
-installer::logger::print_message( "... analyzing shortcuts ... \n" );
+$installer::logger::Info->print( "... analyzing shortcuts ... \n" );
 
 my $linksinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Shortcut");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks1.log", $linksinproductarrayref); }
 
-installer::logger::print_message( "... analyzing unix links ... \n" );
+$installer::logger::Info->print( "... analyzing unix links ... \n" );
 
 my $unixlinksinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Unixlink");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks1.log", $unixlinksinproductarrayref); }
@@ -505,12 +510,12 @@ if ( $installer::globals::globallogging 
 # $unixlinksinproductarrayref = installer::scriptitems::filter_layerlinks_from_unixlinks($unixlinksinproductarrayref);
 # if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks1b.log", $unixlinksinproductarrayref); }
 
-installer::logger::print_message( "... analyzing profile ... \n" );
+$installer::logger::Info->print( "... analyzing profile ... \n" );
 
 my $profilesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Profile");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profiles1.log", $profilesinproductarrayref); }
 
-installer::logger::print_message( "... analyzing profileitems ... \n" );
+$installer::logger::Info->print( "... analyzing profileitems ... \n" );
 
 my $profileitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "ProfileItem");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profileitems1.log", $profileitemsinproductarrayref); }
@@ -523,12 +528,12 @@ my $mergemodulesarrayref;
 
 if ( $installer::globals::iswindowsbuild )	# Windows specific items: Folder, FolderItem, RegistryItem, WindowsCustomAction
 {
-	installer::logger::print_message( "... analyzing folders ... \n" );
+	$installer::logger::Info->print( "... analyzing folders ... \n" );
 
 	$folderinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Folder");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folder1.log", $folderinproductarrayref); }
 
-	installer::logger::print_message( "... analyzing folderitems ... \n" );
+	$installer::logger::Info->print( "... analyzing folderitems ... \n" );
 
 	$folderitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "FolderItem");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folderitems1.log", $folderitemsinproductarrayref); }
@@ -539,7 +544,7 @@ if ( $installer::globals::iswindowsbuild
 	installer::setupscript::prepare_non_advertised_files($folderitemsinproductarrayref, $filesinproductarrayref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles2d.log", $filesinproductarrayref); }
 
-	installer::logger::print_message( "... analyzing registryitems ... \n" );
+	$installer::logger::Info->print( "... analyzing registryitems ... \n" );
 
 	$registryitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "RegistryItem");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems1.log", $registryitemsinproductarrayref); }
@@ -547,12 +552,12 @@ if ( $installer::globals::iswindowsbuild
 	$registryitemsinproductarrayref = installer::scriptitems::remove_uninstall_regitems_from_script($registryitemsinproductarrayref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems1b.log", $registryitemsinproductarrayref); }
 
-	installer::logger::print_message( "... analyzing Windows custom actions ... \n" );
+	$installer::logger::Info->print( "... analyzing Windows custom actions ... \n" );
 
 	$windowscustomactionsarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "WindowsCustomAction");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "windowscustomactions1.log", $windowscustomactionsarrayref); }
 
-	installer::logger::print_message( "... analyzing Windows merge modules ... \n" );
+	$installer::logger::Info->print( "... analyzing Windows merge modules ... \n" );
 
 	$mergemodulesarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "MergeModule");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "mergemodules1.log", $mergemodulesarrayref); }
@@ -562,7 +567,7 @@ my $modulesinproductarrayref;
 
 if (!($installer::globals::is_copy_only_project)) 
 {
-	installer::logger::print_message( "... analyzing modules ... \n" );
+	$installer::logger::Info->print( "... analyzing modules ... \n" );
 
 	$modulesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Module");
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "modules1.log", $modulesinproductarrayref); }
@@ -616,6 +621,7 @@ if ( $installer::globals::debug ) { inst
 
 if ( $installer::globals::debug ) { installer::logger::debuginfo("\nPart 1b: The language dependent part\n"); }
 
+
 for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
 {
 	my $languagesarrayref = installer::languages::get_all_languages_for_one_product($installer::globals::languageproducts[$n], $allvariableshashref);
@@ -623,8 +629,8 @@ for ( my $n = 0; $n <= $#installer::glob
 
 	$installer::globals::alllanguagesinproductarrayref = $languagesarrayref;
 	my $languagestringref = installer::languages::get_language_string($languagesarrayref);
-	installer::logger::print_message( "------------------------------------\n" );
-	installer::logger::print_message( "... languages $$languagestringref ... \n" );
+	$installer::logger::Info->print( "------------------------------------\n" );
+	$installer::logger::Info->print( "... languages $$languagestringref ... \n" );
 
 	if ( $installer::globals::patch )
 	{
@@ -649,7 +655,6 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Until now only global logging into default: logfile.txt
 	############################################################
 
-	@installer::globals::logfileinfo = ();	# new logfile array and new logfile name
 	installer::logger::copy_globalinfo_into_logfile();
 	$installer::globals::globalinfo_copied = 1;
 
@@ -667,13 +672,25 @@ for ( my $n = 0; $n <= $#installer::glob
 		$loglanguagestring = "lang_" . $number_of_languages . "_id_" . $id;				
 	}
 
-	$installer::globals::logfilename = "log_" . $installer::globals::build;
-	if ( $logminor ne "" ) { $installer::globals::logfilename .= "_" . $logminor; }
-	$installer::globals::logfilename .= "_" . $loglanguagestring;
-	$installer::globals::logfilename .= ".log";
+    # Setup the directory where the language dependent log file will be stored.
 	$loggingdir = $loggingdir . $loglanguagestring . $installer::globals::separator;
 	installer::systemactions::create_directory($loggingdir);
 
+    # Set language dependent logging.
+    $installer::globals::logfilename = sprintf("log_%s%s_%s.log",
+        $installer::globals::build,
+        $logminor ne "" ? "_" . $logminor : "",
+        $loglanguagestring);
+    $installer::logger::Lang->set_filename($loggingdir . $installer::globals::logfilename);
+    $installer::logger::Lang->copy_lines_from($installer::logger::Global);
+    $installer::logger::Lang->set_filter(\&installer::control::filter_log_error);
+    installer::control::prepare_error_processing();
+    # All logging to the console is also forwarded to the language dependen log.
+    $installer::logger::Lang->set_forward(undef);
+    $installer::logger::Info->set_forward($installer::logger::Lang);
+    # Scan all log lines for error messages.
+    $installer::logger::Lang->add_timestamp("starting log for language ".$loglanguagestring);
+
 	if ($loglanguagestring ne $loglanguagestring_orig) {
 	    (my $dir = $loggingdir) =~ s!/$!!;
 	    open(my $F1, "> $dir.dir");
@@ -714,7 +731,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	{
 		if ( $allvariableshashref->{'UPDATE_DATABASE'} )
 		{
-			installer::logger::print_message( "... analyzing update database ...\n" );
+			$installer::logger::Info->print( "... analyzing update database ...\n" );
 			$refdatabase = installer::windows::update::readdatabase($allvariableshashref, $languagestringref, $includepatharrayref);
 
 			if ( $installer::globals::updatedatabase )
@@ -776,7 +793,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# files part, language dependent
 	#####################################
 
-	installer::logger::print_message( "... analyzing files ...\n" );
+	$installer::logger::Info->print( "... analyzing files ...\n" );
 
 	my $filesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($filesinproductarrayref, $languagesarrayref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles4.log", $filesinproductlanguageresolvedarrayref); }
@@ -833,15 +850,11 @@ for ( my $n = 0; $n <= $#installer::glob
 	installer::scriptitems::make_filename_language_specific($filesinproductlanguageresolvedarrayref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10f.log", $filesinproductlanguageresolvedarrayref); }
 	
-	# print "... calculating checksums ...\n";
-	# my $checksumfile = installer::worker::make_checksum_file($filesinproductlanguageresolvedarrayref, $includepatharrayref);
-	# if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . $installer::globals::checksumfilename, $checksumfile); }
-
 	######################################################################################
 	# Unzipping files with flag ARCHIVE and putting all included files into the file list
 	######################################################################################
 
-	installer::logger::print_message( "... analyzing files with flag ARCHIVE ...\n" );
+	$installer::logger::Info->print( "... analyzing files with flag ARCHIVE ...\n" );
 
 	my @additional_paths_from_zipfiles = ();
 
@@ -861,7 +874,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Files with flag SUBST_FILENAME
 	#####################################
 	
-	installer::logger::print_message( "... analyzing files with flag SUBST_FILENAME ...\n" );
+	$installer::logger::Info->print( "... analyzing files with flag SUBST_FILENAME ...\n" );
 
 	installer::substfilenamefiles::resolving_subst_filename_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, $languagestringref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles12d.log", $filesinproductlanguageresolvedarrayref); }
@@ -870,7 +883,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Files with flag SCPZIP_REPLACE
 	#####################################
 	
-	installer::logger::print_message( "... analyzing files with flag SCPZIP_REPLACE ...\n" );
+	$installer::logger::Info->print( "... analyzing files with flag SCPZIP_REPLACE ...\n" );
 
 	# Editing files with flag SCPZIP_REPLACE.
 
@@ -881,7 +894,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Files with flag PATCH_SO_NAME
 	#####################################
 	
-	installer::logger::print_message( "... analyzing files with flag PATCH_SO_NAME ...\n" );
+	$installer::logger::Info->print( "... analyzing files with flag PATCH_SO_NAME ...\n" );
 
 	# Editing files with flag PATCH_SO_NAME.
 
@@ -892,7 +905,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Files with flag HIDDEN
 	#####################################
 	
-	installer::logger::print_message( "... analyzing files with flag HIDDEN ...\n" );
+	$installer::logger::Info->print( "... analyzing files with flag HIDDEN ...\n" );
 
 	installer::worker::resolving_hidden_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles13c.log", $filesinproductlanguageresolvedarrayref); }
@@ -901,7 +914,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Collecting directories for epm list file
 	############################################
 
-	installer::logger::print_message( "... analyzing all directories for this product ...\n" );
+	$installer::logger::Info->print( "... analyzing all directories for this product ...\n" );
 
 	# There are two ways for a directory to be included into the epm directory list:
 	# 1. Looking for all destination paths in the files array
@@ -944,7 +957,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# language dependent links part
 	#########################################################
 
-	installer::logger::print_message( "... analyzing links ...\n" );
+	$installer::logger::Info->print( "... analyzing links ...\n" );
 
 	my $linksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($linksinproductarrayref, $languagesarrayref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productlinks2.log", $linksinproductlanguageresolvedarrayref); }
@@ -973,7 +986,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# language dependent unix links part
 	#########################################################
 
-	installer::logger::print_message( "... analyzing unix links ...\n" );
+	$installer::logger::Info->print( "... analyzing unix links ...\n" );
 
 	my $unixlinksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($unixlinksinproductarrayref, $languagesarrayref);
 	if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "unixlinks3.log", $unixlinksinproductlanguageresolvedarrayref); }
@@ -993,7 +1006,7 @@ for ( my $n = 0; $n <= $#installer::glob
 
 	if ((!($installer::globals::is_copy_only_project)) && (!($installer::globals::product =~ /ada/i )) && (!($installer::globals::languagepack)))
 	{
-		installer::logger::print_message( "... creating profiles ...\n" );
+		$installer::logger::Info->print( "... creating profiles ...\n" );
 
 		$profilesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($profilesinproductarrayref, $languagesarrayref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "profiles2.log", $profilesinproductlanguageresolvedarrayref); }
@@ -1035,7 +1048,7 @@ for ( my $n = 0; $n <= $#installer::glob
 		# language dependent part for folder
 		#########################################################
 
-		installer::logger::print_message( "... analyzing folder ...\n" );
+		$installer::logger::Info->print( "... analyzing folder ...\n" );
 
 		$folderinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($folderinproductarrayref, $languagesarrayref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folder2.log", $folderinproductlanguageresolvedarrayref); }
@@ -1047,7 +1060,7 @@ for ( my $n = 0; $n <= $#installer::glob
 		# language dependent part for folderitems
 		#########################################################
 
-		installer::logger::print_message( "... analyzing folderitems ...\n" );
+		$installer::logger::Info->print( "... analyzing folderitems ...\n" );
 
 		$folderitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($folderitemsinproductarrayref, $languagesarrayref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "folderitems2.log", $folderitemsinproductlanguageresolvedarrayref); }
@@ -1059,7 +1072,7 @@ for ( my $n = 0; $n <= $#installer::glob
 		# language dependent part for registryitems
 		#########################################################
 
-		installer::logger::print_message( "... analyzing registryitems ...\n" );
+		$installer::logger::Info->print( "... analyzing registryitems ...\n" );
 
 		$registryitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($registryitemsinproductarrayref, $languagesarrayref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems2.log", $registryitemsinproductlanguageresolvedarrayref); }
@@ -1076,7 +1089,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	
 	if (!($installer::globals::is_copy_only_project)) 
 	{
-		installer::logger::print_message( "... analyzing modules ...\n" );
+		$installer::logger::Info->print( "... analyzing modules ...\n" );
 
 		$modulesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($modulesinproductarrayref, $languagesarrayref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes_modules($loggingdir . "modules2.log", $modulesinproductlanguageresolvedarrayref); }
@@ -1170,7 +1183,7 @@ for ( my $n = 0; $n <= $#installer::glob
 
 	if (( $installer::globals::iswindowsbuild ) && ( ! $installer::globals::patch ))	# Windows specific items: Folder, FolderItem, RegistryItem
 	{
-		installer::logger::print_message( "... creating inf files ...\n" );
+		$installer::logger::Info->print( "... creating inf files ...\n" );
 		installer::worker::create_inf_file($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $folderinproductlanguageresolvedarrayref, $folderitemsinproductlanguageresolvedarrayref, $modulesinproductlanguageresolvedarrayref, $languagesarrayref, $languagestringref, $allvariableshashref);
 		if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles16c.log", $filesinproductlanguageresolvedarrayref); }
 	}
@@ -1203,7 +1216,7 @@ for ( my $n = 0; $n <= $#installer::glob
 	# Analyzing the package structure
 	###########################################################
 
-	installer::logger::print_message( "... analyzing package list ...\n" );
+	$installer::logger::Info->print( "... analyzing package list ...\n" );
 	
 	my $packages = installer::packagelist::collectpackages($modulesinproductlanguageresolvedarrayref, $languagesarrayref);
 	installer::packagelist::check_packagelist($packages);
@@ -1240,13 +1253,6 @@ for ( my $n = 0; $n <= $#installer::glob
 	if (!( $installer::globals::iswindowsbuild ))
 	{
 		####################################################
-		# Writing log file before packages are packed
-		####################################################
-
-		installer::logger::print_message( "... creating log file " . $loggingdir . $installer::globals::logfilename . "\n" );
-		installer::files::save_file($loggingdir . $installer::globals::logfilename, \@installer::globals::logfileinfo);
-
-		####################################################
 		# Creating directories
 		####################################################
 
@@ -1254,8 +1260,6 @@ for ( my $n = 0; $n <= $#installer::glob
 
 		my $listfiledir = installer::systemactions::create_directories("listfile", $languagestringref);
 		my $installlogdir = installer::systemactions::create_directory_next_to_directory($installdir, "log");
-		# installer::packagelist::add_defaultpathes_into_filescollector($filesinproductlanguageresolvedarrayref);
-		# my $installchecksumdir = installer::systemactions::create_directory_next_to_directory($installdir, "checksum");
 
 		####################################################
 		# Reading for Solaris all package descriptions
@@ -1362,9 +1366,8 @@ for ( my $n = 0; $n <= $#installer::glob
 					push(@{$packages}, $onepackage);  # ... and adding it to the end
 					$installer::globals::poolshiftedpackages{$packagename} = 1;	# only shifting each package once
 					$k--;														# decreasing the counter
-					my $localinfoline = "Pool: Package \"$packagename\" cannot be created at the moment. Trying again later (1).\n";
-					installer::logger::print_message($localinfoline);
-					push( @installer::globals::logfileinfo, $localinfoline);
+					$installer::logger::Info->printf("Pool: Package \"%s\" cannot be created at the moment. Trying again later (1).\n", $packagename);
+					$installer::logger::Lang->printf("Pool: Package \"%s\" cannot be created at the moment. Trying again later (1).\n", $packagename);
 					next;														# repeating this iteration with new package
 				}
 			}
@@ -1432,8 +1435,9 @@ for ( my $n = 0; $n <= $#installer::glob
 			if ( ! ( $#{$filesinpackage} > -1 ))
 			{
 				push(@installer::globals::emptypackages, $packagename);
-				$infoline = "\n\nNo file in package: $packagename \-\> Skipping\n\n"; 
-				push(@installer::globals::logfileinfo, $infoline);
+                $installer::logger::Lang->print("\n");
+                $installer::logger::Lang->print("\n");
+                $installer::logger::Lang->print("No file in package: %s \-\> Skipping\n\n", $packagename);
 				next;	# next package, end of loop !
 			}
 
@@ -1447,8 +1451,10 @@ for ( my $n = 0; $n <= $#installer::glob
 				my $patchfiles = installer::worker::collect_all_items_with_special_flag($filesinpackage ,"PATCH");
 				if ( ! ( $#{$patchfiles} > -1 ))
 				{
-					$infoline = "\n\nLinux Patch: No patch file in package: $packagename \-\> Skipping\n\n"; 
-					push(@installer::globals::logfileinfo, $infoline);
+                    $installer::logger::Lang->print("\n");
+                    $installer::logger::Lang->print("\n");
+                    $installer::logger::Lang->print("Linux Patch: No patch file in package: %s \-\> Skipping\n\n",
+                        $packagename); 
 					next;
 				}
 			}
@@ -1542,7 +1548,7 @@ for ( my $n = 0; $n <= $#installer::glob
 
 				my $epmfilename = "epm_" . $onepackagename . $linkaddon . ".lst";
 
-				installer::logger::print_message( "... creating epm list file $epmfilename ... \n" );
+				$installer::logger::Info->print( "... creating epm list file $epmfilename ... \n" );
 
 				my $completeepmfilename = $listfiledir . $installer::globals::separator . $epmfilename;
 
@@ -1559,8 +1565,8 @@ for ( my $n = 0; $n <= $#installer::glob
 					if ( ! ( $#{$filesinpackage} > -1 ))
 					{
 						push(@installer::globals::emptypackages, $packagename);
-						$infoline = "\nNo file in package: $packagename \-\> Skipping\n"; 
-						push(@installer::globals::logfileinfo, $infoline);
+                        $installer::logger::Lang->print("\n");
+                        $installer::logger::Lang->print("No file in package: %s \-\> Skipping\n", $packagename); 
 						next;	# next package, end of loop !
 					}
 				}
@@ -1612,9 +1618,10 @@ for ( my $n = 0; $n <= $#installer::glob
 						push(@{$packages}, $onepackage);  # ... and adding it to the end
 						$installer::globals::poolshiftedpackages{$packagename} = 1;	# only shifting each package once
 						$k--;														# decreasing the counter
-						my $localinfoline = "\nPool: Package \"$packagename\" cannot be created at the moment. Trying again later (2).\n";
-						installer::logger::print_message($localinfoline);
-						push( @installer::globals::logfileinfo, $localinfoline);
+						$installer::logger::Info->print("\n");
+						$installer::logger::Info->print("Pool: Package \"%s\" cannot be created at the moment. Trying again later (2).\n", $packagename);
+						$installer::logger::Lang->print("\n");
+						$installer::logger::Lang->print("Pool: Package \"%s\" cannot be created at the moment. Trying again later (2).\n", $packagename);
 						next;														# repeating this iteration with new package
 					}
 				}
@@ -1622,9 +1629,10 @@ for ( my $n = 0; $n <= $#installer::glob
 				if ( $use_package_from_pool == 4 ) # There was a problem with pooling. Repeat this package immediately.
 				{
 						$k--;														# decreasing the counter
-						my $localinfoline = "\nPool: Package \"$packagename\" had pooling problems. Repeating packaging immediately (3).\n";
-						installer::logger::print_message($localinfoline);
-						push( @installer::globals::logfileinfo, $localinfoline);
+						$installer::logger::Info->print("\n");
+						$installer::logger::Info->print("Pool: Package \"%s\" had pooling problems. Repeating packaging immediately (3).\n", $packagename);
+						$installer::logger::Lang->print("\n");
+						$installer::logger::Lang->print("Pool: Package \"%s\" had pooling problems. Repeating packaging immediately (3).\n", $packagename);
 						next;														# repeating this iteration
 				}
 
@@ -1654,7 +1662,7 @@ for ( my $n = 0; $n <= $#installer::glob
 						{
 							# ... now epm can be started, to create the installation sets
 
-							installer::logger::print_message( "... starting patched epm ... \n" );
+							$installer::logger::Info->print( "... starting patched epm ... \n" );
 
 							installer::epmfile::call_epm($epmexecutable, $completeepmfilename, $packagename, $includepatharrayref);
 
@@ -1686,7 +1694,7 @@ for ( my $n = 0; $n <= $#installer::glob
 						{
 							# ... now epm can be started, to create the installation sets
 
-							installer::logger::print_message( "... starting unpatched epm ... \n" );
+							$installer::logger::Info->print( "... starting unpatched epm ... \n" );
 			
 							if ( $installer::globals::call_epm ) { installer::epmfile::call_epm($epmexecutable, $completeepmfilename, $packagename, $includepatharrayref); }
 
@@ -1906,7 +1914,7 @@ for ( my $n = 0; $n <= $#installer::glob
 		# Begin of functions that are used for the creation of idt files (Windows only)
 		#################################################################################
 		
-		installer::logger::print_message( "... creating idt files ...\n" );
+		$installer::logger::Info->print( "... creating idt files ...\n" );
 
 		installer::logger::include_header_into_logfile("Creating idt files:");
 
@@ -1997,9 +2005,8 @@ for ( my $n = 0; $n <= $#installer::glob
 			installer::windows::assembly::create_msiassemblyname_table($filesinproductlanguageresolvedarrayref, $newidtdir);
 			installer::windows::assembly::add_assembly_condition_into_component_table($filesinproductlanguageresolvedarrayref, $newidtdir);
 		}
-		
-		$infoline = "\n"; 
-		push(@installer::globals::logfileinfo, $infoline);
+
+        $installer::logger::Lang->print("\n");
 
 		# Localizing the language dependent idt files
 		# For every language there will be a localized msi database
@@ -2019,7 +2026,7 @@ for ( my $n = 0; $n <= $#installer::glob
 
 			# Copy the template idt files and the new created idt files into this language directory
 
-			installer::logger::print_message( "... copying idt files ...\n" );
+			$installer::logger::Info->print( "... copying idt files ...\n" );
 
 			installer::logger::include_header_into_logfile("Copying idt files to $languageidtdir:");
 						
@@ -2035,14 +2042,14 @@ for ( my $n = 0; $n <= $#installer::glob
 				my $controlidttable = installer::files::read_file($controlidttablename);
 				installer::windows::idtglobal::add_language_checkboxes_to_database($controlidttable, $languagesarrayref);
 				installer::files::save_file($controlidttablename, $controlidttable);
-				$infoline = "Added checkboxes for language selection dialog into table $controlidttablename\n"; 
-				push(@installer::globals::logfileinfo, $infoline);
+                $installer::logger::Lang->printf("Added checkboxes for language selection dialog into table %s\n",
+                    $controlidttablename); 
 			}
 
 			# Now all files are copied into a language specific directory
 			# The template idt files can be translated
 
-			installer::logger::print_message( "... localizing idt files (language: $onelanguage) ...\n" );
+			$installer::logger::Info->print( "... localizing idt files (language: $onelanguage) ...\n" );
 
 			installer::logger::include_header_into_logfile("Localizing idt files (Language: $onelanguage):");
 
@@ -2072,10 +2079,10 @@ for ( my $n = 0; $n <= $#installer::glob
 				 
 				installer::files::save_file($oneidtfilename, $oneidtfile);
 
-				$infoline = "Translated idt file: $oneidtfilename into language $onelanguage\n"; 
-				push(@installer::globals::logfileinfo, $infoline);
-				$infoline = "Used languagefile: $languagefilename\n"; 
-				push(@installer::globals::logfileinfo, $infoline);
+                $installer::logger::Lang->printf("Translated idt file: %s into language %s\n",
+                    $oneidtfilename,
+                    $onelanguage); 
+                $installer::logger::Lang->printf("Used languagefile: %s\n", $languagefilename);
 			}	
 			
 			# setting the encoding in every table (replacing WINDOWSENCODINGTEMPLATE)
@@ -2101,8 +2108,9 @@ for ( my $n = 0; $n <= $#installer::glob
 				installer::windows::idtglobal::add_licensefile_to_database($licensefile, $controltable);
 				installer::files::save_file($controltablename, $controltable);
 
-				$infoline = "Added licensefile $licensefilesource into database $controltablename\n"; 
-				push(@installer::globals::logfileinfo, $infoline);
+                $installer::logger::Lang->printf("Added licensefile %s into database %s\n",
+                    $licensefilesource,
+                    $controltablename); 
 			}
 
 			# include a component into environment table if required
@@ -2160,7 +2168,7 @@ for ( my $n = 0; $n <= $#installer::glob
 				my $msidatabasename = installer::windows::msiglobal::get_msidatabasename($allvariableshashref, $onelanguage);
 				my $msifilename = $languageidtdir . $installer::globals::separator . $msidatabasename;
 
-				installer::logger::print_message( "... creating msi database (language $onelanguage) ... \n" );
+				$installer::logger::Info->print( "... creating msi database (language $onelanguage) ... \n" );
 
 				installer::windows::msiglobal::set_uuid_into_component_table($languageidtdir, $allvariableshashref);	# setting new GUID for the components using the tool uuidgen.exe
 				installer::windows::msiglobal::prepare_64bit_database($languageidtdir, $allvariableshashref);	# making last 64 bit changes
@@ -2202,7 +2210,7 @@ for ( my $n = 0; $n <= $#installer::glob
 
 			if ( $allvariableshashref->{'ADDLANGUAGEINDATABASENAME'} ) { installer::windows::msiglobal::add_language_to_msi_database($defaultlanguage, $installdir, $allvariableshashref); }
 
-			installer::logger::print_message( "... generating setup.ini ...\n" );
+			$installer::logger::Info->print( "... generating setup.ini ...\n" );
 			
 			if ( ! $allvariableshashref->{'NOLOADERREQUIRED'} ) { installer::windows::msiglobal::create_setup_ini($languagesarrayref, $defaultlanguage, $installdir, $allvariableshashref); }
 		}
@@ -2210,7 +2218,7 @@ for ( my $n = 0; $n <= $#installer::glob
 		# Analyzing the ScpActions and copying the files into the installation set
 		# At least the loader.exe
 
-		installer::logger::print_message( "... copying files into installation set ...\n" );
+		$installer::logger::Info->print( "... copying files into installation set ...\n" );
 
 		# installer::windows::msiglobal::copy_scpactions_into_installset($defaultlanguage, $installdir, $scpactionsinproductlanguageresolvedarrayref);
 		installer::worker::put_scpactions_into_installset($installdir);
@@ -2230,7 +2238,7 @@ for ( my $n = 0; $n <= $#installer::glob
 			installer::windows::msiglobal::copy_child_projects_into_installset($installdir, $allvariableshashref);
 		}
 
-		installer::logger::print_message( "... creating ddf files ...\n" );
+		$installer::logger::Info->print( "... creating ddf files ...\n" );
 
 		# Creating all needed ddf files and generating a list
 		# for the package process containing all system calls
@@ -2242,17 +2250,7 @@ for ( my $n = 0; $n <= $#installer::glob
 		# Update and patch reasons the pack order needs to be saved
 		installer::windows::msiglobal::save_packorder();
 
-		$infoline = "\n"; 
-		push(@installer::globals::logfileinfo, $infoline);
-
-		####################################
-		# Writing log file
-		# before cab files are packed
-		####################################
-
-		installer::logger::print_message( "... creating log file $installer::globals::logfilename \n" );
-
-		installer::files::save_file($loggingdir . $installer::globals::logfilename, \@installer::globals::logfileinfo);
+        $installer::logger::Info->print("\n"); 
 
 		#######################################################
 		# Finally really create the installation packages,
@@ -2261,17 +2259,9 @@ for ( my $n = 0; $n <= $#installer::glob
 
 		if ( $installer::globals::iswin )	# only possible on a Windows platform
 		{
-			installer::logger::print_message( "... packaging installation set ... \n" );
+			$installer::logger::Info->print( "... packaging installation set ... \n" );
 			installer::windows::msiglobal::execute_packaging($installer::globals::packjobref, $loggingdir, $allvariableshashref);
 			if ( $installer::globals::include_cab_in_msi ) { installer::windows::msiglobal::include_cabs_into_msi($installdir); }
-
-			####################################
-			# Writing log file
-			# after cab files are packed
-			####################################
-
-			installer::logger::print_message( "\n... creating log file $installer::globals::logfilename \n" );
-			installer::files::save_file($loggingdir . $installer::globals::logfilename, \@installer::globals::logfileinfo);
 		}
 
 		#######################################################

Modified: openoffice/trunk/main/solenv/bin/modules/installer/archivefiles.pm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/archivefiles.pm?rev=1537433&r1=1537432&r2=1537433&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/archivefiles.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/archivefiles.pm Thu Oct 31 10:37:56 2013
@@ -197,12 +197,10 @@ sub resolving_archive_flag
 			{
 				$select_files = 1;
 				$selectlistfiles = get_patch_file_list( $onefile->{'Selectfiles'} );
-				$infoline = "Selected file list defined at file: $onefile->{'Name'} :\n";
-				push( @installer::globals::logfileinfo, $infoline);
-				for ( my $k = 0; $k <= $#{$selectlistfiles}; $k++ )
+                $installer::logging::Lang->printf("Selected file list defined at file: %s :\n", $onefile->{'Name'});
+                foreach my $line (@$selectlistfiles)
 				{
-					$infoline = "\"${$selectlistfiles}[$k]\"\n";
-					push( @installer::globals::logfileinfo, $infoline);
+                    $installer::logging::Lang->printf("\"%s\"\n", $line);
 				}
 			}
 			
@@ -216,12 +214,10 @@ sub resolving_archive_flag
 			{
 				$select_patch_files = 1; # special handling if a Patchlist is defined
 				$patchlistfiles = get_patch_file_list( $onefile->{'Patchfiles'} );
-				$infoline = "Patch file list defined at file: $onefile->{'Name'} :\n";
-				push( @installer::globals::logfileinfo, $infoline);
-				for ( my $k = 0; $k <= $#{$patchlistfiles}; $k++ )
+                $installer::logger::Lang->printf("Patch file list defined at file: %s :\n", $onefile->{'Name'});
+				foreach my $line (@$patchlistfiles)
 				{
-					$infoline = "\"${$patchlistfiles}[$k]\"\n";
-					push( @installer::globals::logfileinfo, $infoline);
+                    $installer::logger::Lang->printf("\"%s\"\n", $line);
 				}
 			}
 
@@ -254,8 +250,7 @@ sub resolving_archive_flag
 			my $zip = Archive::Zip->new();
 			if ( $zip->read($sourcepath) != AZ_OK )
 			{
-				$infoline = "ERROR: Could not unzip $sourcepath\n";
-				push( @installer::globals::logfileinfo, $infoline);				
+                $installer::logger::Lang->printf("ERROR: Could not unzip %s\n", $sourcepath);
 			}
 
 			my $counter = 0;
@@ -268,28 +263,27 @@ sub resolving_archive_flag
 
 			if (! ( $counter > 0 ))	# the zipfile is empty
 			{
-				$infoline = "ERROR: Could not unzip $sourcepath\n";
-				push( @installer::globals::logfileinfo, $infoline);
-				
+                $installer::logger::Lang->printf("ERROR: Could not unzip %s\n", $sourcepath);
 			}
 			else
 			{
 				if ( $installer::globals::dounzip )			# really unpacking the files 
 				{					
-					if ( $zip->extractTree("", $unzipdir) != AZ_OK ) { installer::exiter::exit_program("ERROR: $infoline", "resolving_archive_flag"); }
+					if ( $zip->extractTree("", $unzipdir) != AZ_OK )
+                    {
+                        installer::exiter::exit_program("ERROR: can not unzip ".$sourcepath, "resolving_archive_flag");
+                    }
 
 					if (( $^O =~ /cygwin/i ) && ( $contains_dll ))
 					{
 						# Make dll's executable
 						$systemcall = "cd $unzipdir; find . -name \\*.dll -exec chmod 775 \{\} \\\;";
 						$returnvalue = system($systemcall);
-						$infoline = "Systemcall: $systemcall\n";
-						push( @installer::globals::logfileinfo, $infoline);
+						$installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
 		
 						if ($returnvalue)
 						{
-							$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-							push( @installer::globals::logfileinfo, $infoline);
+							$installer::logger::Lang->printf("ERROR: Could not execute \"\"!\n", $systemcall);
 						}
 					}
 
@@ -299,13 +293,10 @@ sub resolving_archive_flag
 		
 						$systemcall = "cd $unzipdir; find . -type d -exec chmod 775 \{\} \\\;";
 						$returnvalue = system($systemcall);
-						$infoline = "Systemcall: $systemcall\n";
-						push( @installer::globals::logfileinfo, $infoline);
-		
+                        $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
 						if ($returnvalue)
 						{
-							$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-							push( @installer::globals::logfileinfo, $infoline);
+                            $installer::logger::Lang->printf("ERROR: Could not execute \"\"!\n", $systemcall);
 						}
 					}
 					
@@ -363,8 +354,10 @@ sub resolving_archive_flag
 						{
 							my $value = sprintf("%o", (stat($newfile{'sourcepath'}))[2]);
 							$newfile{'UnixRights'} = substr($value, 3);
-							$infoline = "Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n";
-							push( @installer::globals::logfileinfo, $infoline);		
+                            $installer::logger::Lang->printf(
+                                "Setting unix rights for \"%s\" to \"%s\"\n",
+                                $newfile{'sourcepath'},
+                                $newfile{'UnixRights'});
 						}
 						
 						if ( $set_executable_privileges )
@@ -375,8 +368,10 @@ sub resolving_archive_flag
 							if ( exists($executable_files_in_extensions{$compare_path}) )
 							{
 								$newfile{'UnixRights'} = "775";
-								$infoline = "Executable in Extension: Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n";
-								push( @installer::globals::logfileinfo, $infoline);
+                                $installer::logger::Lang->printf(
+                                    "Executable in Extension: Setting unix rights for \"%s\" to \"%s\"\n",
+                                    $newfile{'sourcepath'},
+                                    $newfile{'UnixRights'});
 							}
 						}
 						
@@ -384,14 +379,16 @@ sub resolving_archive_flag
 						{
 							if ( ! installer::existence::exists_in_array($zipname,$selectlistfiles) )
 							{
-								$infoline = "Removing from ARCHIVE file $onefilename: $zipname\n";
-								push( @installer::globals::logfileinfo, $infoline);		
+                                $installer::logger::Lang->printf("Removing from ARCHIVE file %s: %s\n",
+                                    $onefilename,
+                                    $zipname);
 								next; # ignoring files, that are not included in $selectlistfiles
 							}
 							else
 							{
-								$infoline = "Keeping from ARCHIVE file $onefilename: $zipname\n";
-								push( @installer::globals::logfileinfo, $infoline);		
+                                $installer::logger::Lang->printf("Keeping from ARCHIVE file %s: \n",
+                                    $onefilename,
+                                    $zipname);
 								push( @keptfiles, $zipname); # collecting all kept files
 							}			
 						}
@@ -407,13 +404,9 @@ sub resolving_archive_flag
 								$newfile{'Styles'} =~ s/\,\s*\,/\,/;
 								$newfile{'Styles'} =~ s/\(\s*\,/\(/;
 								$newfile{'Styles'} =~ s/\,\s*\)/\)/;
-								# $infoline = "Removing PATCH flag from: $zipname\n";
-								# push( @installer::globals::logfileinfo, $infoline);	
 							}
 							else
 							{
-								# $infoline = "Keeping PATCH flag at: $zipname\n";
-								# push( @installer::globals::logfileinfo, $infoline);		
 								push( @keptpatchflags, $zipname); # collecting all PATCH flags 
 							}
 						}
@@ -430,15 +423,15 @@ sub resolving_archive_flag
 							$newfile{'destination'} = $destination . $newzipname;
 							$newfile{'sourcepath'} = $unzipdir . $newzipname;
 
-							$infoline = "RENAME_TO_LANGUAGE: Using $newzipname instead of $zipname!\n";
-							push( @installer::globals::logfileinfo, $infoline);
+                            $installer::logger::Lang->printf("RENAME_TO_LANGUAGE: Using %s instead of %s!\n",
+                                $newzipname,
+                                $zipname);
 						}
 							
 						my $sourcefiletest = $unzipdir . $zipname;							
 						if ( ! -f $sourcefiletest )
 						{
-							$infoline = "ATTENTION: Unzip failed for $sourcefiletest!\n";
-							push( @installer::globals::logfileinfo, $infoline);
+                            $installer::logger::Lang->printf("ATTENTION: Unzip failed for %s!\n", $sourcefiletest);
 							$unziperror = 1;
 						}
 
@@ -455,35 +448,25 @@ sub resolving_archive_flag
 				
 				if ( $select_files )
 				{
-					my $number = $#{$selectlistfiles} + 1;
-					$infoline = "SELECTLIST: Number of files in file selection list: $number\n";
-					push( @installer::globals::logfileinfo, $infoline);
-					$number = $#keptfiles + 1;
-					$infoline = "SELECTLIST: Number of kept files: $number\n";
-					push( @installer::globals::logfileinfo, $infoline);
+                    $installer::logger::Lang->printf("SELECTLIST: Number of files in file selection list: %d\n",
+                        scalar @$selectlistfiles);
+                    $installer::logger::Lang->printf("SELECTLIST: Number of kept files: %d\n",
+                        scalar @keptfiles);
 
-					for ( my $k = 0; $k <= $#keptfiles; $k++ )
+					foreach my $name (@keptfiles)
 					{
-						$infoline = "KEPT FILES: $keptfiles[$k]\n";
-						push( @installer::globals::logfileinfo, $infoline);
+                        $installer::logger::Lang->printf("KEPT FILES: %s\n", $name);
 					}
 
-					my @warningfiles = ();
-
-					for ( my $k = 0; $k <= $#{$selectlistfiles}; $k++ )
+					foreach my $name (@$selectlistfiles)
 					{
-						if ( ! installer::existence::exists_in_array(${$selectlistfiles}[$k],\@keptfiles) )
+						if ( ! installer::existence::exists_in_array($name,\@keptfiles) )
 						{
-							push(@warningfiles, ${$selectlistfiles}[$k]);
+                            $installer::logger::Lang->printf(
+                                "WARNING: %s not included in install set (does not exist in zip file)!\n",
+                                $name);;
 						}
 					}
-
-					for ( my $k = 0; $k <= $#warningfiles; $k++ )
-					{
-						$infoline = "WARNING: $warningfiles[$k] not included in install set (does not exist in zip file)!\n";
-						push( @installer::globals::logfileinfo, $infoline);
-					}		
-					
 				}
 
 				# Comparing the content of @keptpatchflags and $patchlistfiles
@@ -493,41 +476,32 @@ sub resolving_archive_flag
 
 				if ( $select_patch_files )
 				{
-					my $number = $#{$patchlistfiles} + 1;
-					$infoline = "PATCHLIST: Number of files in patch list: $number\n";
-					push( @installer::globals::logfileinfo, $infoline);
-					$number = $#keptpatchflags + 1;
-					$infoline = "PATCHLIST: Number of kept PATCH flags: $number\n";
-					push( @installer::globals::logfileinfo, $infoline);
+                    $installer::logger::Lang->printf("PATCHLIST: Number of files in patch list: %d\n",
+                        scalar @$patchlistfiles);
+                    $installer::logger::Lang->printf("PATCHLIST: Number of kept PATCH flags: %d\n",
+                        scalar @keptpatchflags);
 
-					for ( my $k = 0; $k <= $#keptpatchflags; $k++ )
+					foreach my $flag (@keptpatchflags)
 					{
-						$infoline = "KEPT PATCH FLAGS: $keptpatchflags[$k]\n";
-						push( @installer::globals::logfileinfo, $infoline);
+                        $installer::logger::Lang->printf("KEPT PATCH FLAGS: %s\n",
+                            $flag);
 					}
 
-					my @warningfiles = ();
-
-					for ( my $k = 0; $k <= $#{$patchlistfiles}; $k++ )
+					foreach my $name (@$patchlistfiles)
 					{
-						if ( ! installer::existence::exists_in_array(${$patchlistfiles}[$k],\@keptpatchflags) )
+						if ( ! installer::existence::exists_in_array($name,\@keptpatchflags) )
 						{
-							push(@warningfiles, ${$patchlistfiles}[$k]);
-						}
-					}
-
-					for ( my $k = 0; $k <= $#warningfiles; $k++ )
-					{
-						$infoline = "WARNING: $warningfiles[$k] did not keep PATCH flag (does not exist in zip file)!\n";
-						push( @installer::globals::logfileinfo, $infoline);
+                            $installer::logger::Lang->printf(
+                                "WARNING: %s did not keep PATCH flag (does not exist in zip file)!\n",
+                                $name);
+                        }
 					}		
 				}
 
 				if ( $unziperror )
 				{ 
 					installer::logger::print_warning( "Repeating to unpack $sourcepath! \n" );
-					$infoline = "ATTENTION: Repeating to unpack $sourcepath !\n";
-					push( @installer::globals::logfileinfo, $infoline);
+                    $installer::logger::Lang->printf("ATTENTION: Repeating to unpack %s!\n", $sourcepath);
 					$repeat_unzip = 1;
 					$maxcounter++;
 					
@@ -538,8 +512,7 @@ sub resolving_archive_flag
 				}
 				else
 				{
-					$infoline = "Info: $sourcepath unpacked without problems !\n";
-					push( @installer::globals::logfileinfo, $infoline);					
+                    $installer::logger::Lang->printf("Info: %s unpacked without problems !\n", $sourcepath);
 					$repeat_unzip = 0;
 					$maxcounter = 0;
 				}				
@@ -551,8 +524,7 @@ sub resolving_archive_flag
 		}	
 	}	
 
-	$infoline = "\n";
-	push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->print("\n");
 
 	return \@newallfilesarray;
 }

Modified: openoffice/trunk/main/solenv/bin/modules/installer/configuration.pm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/configuration.pm?rev=1537433&r1=1537432&r2=1537433&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/configuration.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/configuration.pm Thu Oct 31 10:37:56 2013
@@ -760,18 +760,16 @@ sub save_and_zip_configfile
 
 	chdir($currentdir);
 
-	my $infoline = "Systemcall: $systemcall\n";
-	push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
 		
 	if ($returnvalue)
 	{
-		$infoline = "ERROR: Could not zip $savefilename to $zipfilename\n";
+        $installer::logger::Lang->printf("ERROR: Could not zip %s to %s\n", $savefilename, $zipfilename);
 	}
 	else
 	{
-		$infoline = "SUCCESS: Zipped file $savefilename to $zipfilename\n";
+        $installer::logger::Lang->printf("SUCCESS: Zipped file %s to %s\n", $savefilename, $zipfilename);
 	}
-	push( @installer::globals::logfileinfo, $infoline);
 	
 	return $zipfilename;
 }
@@ -889,9 +887,7 @@ sub create_configuration_files
 		}
 	}
 
-	my $infoline = "\n";
-	push( @installer::globals::logfileinfo, $infoline);
-	
+    $installer::logger::Lang->print("\n");
 }
 
 1;

Modified: openoffice/trunk/main/solenv/bin/modules/installer/control.pm
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/control.pm?rev=1537433&r1=1537432&r2=1537433&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/control.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/control.pm Thu Oct 31 10:37:56 2013
@@ -32,6 +32,8 @@ use installer::pathanalyzer;
 use installer::scriptitems;
 use installer::systemactions;
 
+our @ErrorMessages = undef;
+
 #########################################################
 # Function that can be used for additional controls.
 # Search happens in $installer::globals::patharray.
@@ -40,10 +42,11 @@ use installer::systemactions;
 sub check_needed_files_in_path
 {
 	my ( $filesref ) = @_;
-	
-	foreach $onefile ( @{$filesref} )
+
+    my $error = 0;
+	foreach my $onefile ( @{$filesref} )
 	{
-		installer::logger::print_message( "...... searching $onefile ..." );
+		$installer::logger::Info->printf("...... searching %s ...\n", $onefile);
 
 		my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile, $installer::globals::patharray , 0);
 
@@ -54,7 +57,7 @@ sub check_needed_files_in_path
 		}
 		else
 		{
-			installer::logger::print_message( "\tFound: $$fileref\n" );
+			$installer::logger::Info->print( "\tFound: $$fileref\n" );
 		}		
 	}
 
@@ -126,7 +129,7 @@ sub check_system_path
 
 	foreach $onefile ( @needed_files_in_path )
 	{
-		installer::logger::print_message( "...... searching $onefile ..." );
+		$installer::logger::Info->printf("...... searching %s ...\n", $onefile);
 
 		my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile, $patharrayref , 0);
 
@@ -137,7 +140,7 @@ sub check_system_path
 		}
 		else
 		{
-			installer::logger::print_message( "\tFound: $$fileref\n" );
+			$installer::logger::Info->print( "\tFound: $$fileref\n" );
 			# Saving the absolut path for msitran.exe. This is required for the determination of the checksum.
 			if ( $onefile eq "msitran.exe" ) { $installer::globals::msitranpath = $$fileref; }
 		}		
@@ -180,7 +183,7 @@ sub check_system_path
 	{
 		$installer::globals::upx_in_path = 1;
 		$installer::globals::upxfile = $$upxfileref;
-		installer::logger::print_message( "\tFound: $$upxfileref\n" );
+		$installer::logger::Info->print( "\tFound: $$upxfileref\n" );
 	}
 
 }
@@ -204,13 +207,11 @@ sub get_makecab_version
 
 	if ($returnvalue)
 	{
-		$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-		push( @installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->printf("ERROR: Could not execute \"%s\"!\n", $systemcall);
 	}
 	else
 	{
-		$infoline = "Success: Executed \"$systemcall\" successfully!\n";
-		push( @installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->printf("Success: Executed \"%s\" successfully!\n", $systemcall);
 		
 		my $versionline = "";
 
@@ -222,9 +223,8 @@ sub get_makecab_version
 				last;
 			}
 		}
-		
-		$infoline = $versionline;
-		push( @installer::globals::globallogfileinfo, $infoline);
+
+        $installer::logger::Global->printf("%s\n", $versionline);
 		
 		if ( $versionline =~ /\bVersion\b\s+(\d+[\d\.]+\d+)\s+/ )
 		{
@@ -237,9 +237,8 @@ sub get_makecab_version
 		{
 			$makecabversion = $1;
 		}
-		
-		$infoline = "Using version: " . $makecabversion . "\n";
-		push( @installer::globals::globallogfileinfo, $infoline);
+
+        $installer::logger::Global->printf("Using version: %s\n", $makecabversion);
 	}
 	
 	return $makecabversion;
@@ -258,8 +257,7 @@ sub check_makecab_version
 	
 	my $makecabversion = get_makecab_version();
 
-	my $infoline = "Tested version: " . $installer::globals::controlledmakecabversion . "\n";
-	push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf("Tested version: %s\n", $installer::globals::controlledmakecabversion);
 	
 	if ( $makecabversion < 0 ) { $do_check = 0; } # version could not be determined
 	
@@ -280,8 +278,7 @@ sub check_makecab_version
 	}
 	else
 	{
-		$infoline = "Warning: No version check of makecab.exe\n";
-		push( @installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->print("Warning: No version check of makecab.exe\n");
 	}
 }
 
@@ -317,113 +314,120 @@ sub check_system_environment
 	return \%variables;
 }
 
-#############################################################
-# Controlling the log file at the end of the
-# packaging process
-#############################################################
 
-sub check_logfile
+sub prepare_error_processing ()
 {
-	my ($logfile) = @_;
+    @ErrorMessages = ();
+}
 
-	my @errors = ();
-	my @output = ();
-	my $contains_error = 0;
-	
-	my $ignore_error = 0;
-	my $make_error_to_warning = 0;
-	
-	if (( ! $installer::globals::pro ) && ( $installer::globals::ignore_error_in_logfile )) { $ignore_error = 1; }
+=item filter_log_error ($relative_time, $log_id, $process_id, $message)
 
-	for ( my $i = 0; $i <= $#{$logfile}; $i++ )
-	{
-		my $line = ${$logfile}[$i];
-		
-		# Errors are all errors, but not the Windows installer table "Error.idt"
+    Process the given log message.  Returns $message unaltered.
+    
+=cut
+sub filter_log_error ($$$$)
+{
+    my ($relative_time, $log_id, $process_id, $message) = @_;
+
+    if ($message =~ /\berror\b/i)
+    {
+        # Message contains the word "error".  Now we have to find out if it is relevant.
 
-		my $compareline = $line;
-		$compareline =~ s/Error\.idt//g;	# removing all occurences of "Error.idt"
-		$compareline =~ s/Error\.mlf//g;	# removing all occurences of "Error.mlf"
-		$compareline =~ s/Error\.ulf//g;	# removing all occurences of "Error.ulf"
-		$compareline =~ s/Error\.idl//g;	# removing all occurences of "Error.idl"
-		$compareline =~ s/Error\.html//g;	# removing all occurences of "Error.html"
-        # Ugly workaround for (boost) headers
-        $compareline =~ s/error\.hpp//g;    # removing all occurences of "error.hpp"
-        $compareline =~ s/error\.ipp//g;    # removing all occurences of "error.ipp"
+        # Remove all filenames that contain the word "Error".
+		my $work_string = $message;
+		$work_string =~ s/Error\.(idt|mlf|ulf|html|hpp|ipp)//g;
 		
-		if ( $compareline =~ /\bError\b/i )
+		if ($work_string =~ /\bError\b/i)
 		{
-			$contains_error = 1;
-			push(@errors, $line);
-			
-			if ( $ignore_error )
-			{
-				$contains_error = 0;
-				$make_error_to_warning = 1;
-			}
+            # This really is an error message.
+            push @ErrorMessages, {'relative_time' => $relative_time,
+                                  'message' => $message};
 		}
 	}
 
-	if ($contains_error)
-	{
-		my $line = "\n*********************************************************************\n";
-		push(@output, $line);
-		$line = "ERROR: The following errors occured in packaging process:\n\n";
-		push(@output, $line);
+    return $message;
+}
 
-		for ( my $i = 0; $i <= $#errors; $i++ )
-		{
-			$line = "$errors[$i]";
-			push(@output, $line);
-		}
-		
-		$line = "*********************************************************************\n";
-		push(@output, $line);
-#		exit(-1);
-	}
-	else
-	{
-		my $line = "";
-		
-		if ( $make_error_to_warning )
-		{
-			$line = "\n*********************************************************************\n";
-			push(@output, $line);
-			$line = "The following errors in the log file were ignored:\n\n";
-			push(@output, $line);
 
-			for ( my $i = 0; $i <= $#errors; $i++ )
-			{
-				$line = "$errors[$i]";
-				push(@output, $line);
-			}
-		
-			$line = "*********************************************************************\n";
-			push(@output, $line);		
-		}
-		
-		$line = "\n***********************************************************\n";
-		push(@output, $line);
-		$line = "Successful packaging process!\n";
-		push(@output, $line);
-		$line = "***********************************************************\n";
-		push(@output, $line);
-	}
 
-	# printing the output file and adding it to the logfile
+
+sub printocessed_error_lines ()
+{
+    my $lines = [];
+
+    foreach my $line (@ErrorMessages)
+    {
+        push @$lines, sprintf("    %12.6f : %s", $line->{'relative_time'}, $line->{'message'});
+    }
+
+    return $lines;
+}
+
+
+
+
+=item check_logfile()
+    
+    Print all error messages (typically at the end) on the console.
+    
+=cut
+sub check_logfile ()
+{
+	my ($logfile) = @_;
+
+	my @errors = ();
+	my @output = ();
 	
+	my $ignore_errors = ( ! $installer::globals::pro ) && ( $installer::globals::ignore_error_in_logfile );
+	my $contains_errors = scalar @ErrorMessages > 0;
+
+    # Format errors
+	if ($contains_errors)
+    {
+        push(@output, "\n");
+        push(@output, "*********************************************************************\n");
+        if ($ignore_errors)
+        {
+            push(@output, "The following errors in the log file were ignored:\n");
+        }
+        else
+        {
+            push(@output, "ERROR: The following errors occured in packaging process:\n");
+        }
+        push(@output, "\n");
+
+        foreach my $line (@ErrorMessages)
+        {
+            push @output, sprintf("    %12.6f : %s", $line->{'relative_time'}, $line->{'message'});
+        }
+		
+		push(@output, "*********************************************************************\n");
+	}
+
+    # Claim success if there where no errors or if errors are treated as warnings.
+	if ( ! $contains_errors || $ignore_errors)
+    {
+		push(@output, "\n");
+		push(@output, "***********************************************************\n");
+		push(@output, "Successful packaging process!\n");
+		push(@output, "***********************************************************\n");
+	}
+
+	# Print the summary.
 	installer::logger::include_header_into_logfile("Summary:");
-	
 	my $force = 1; # print this message even in 'quiet' mode
-	for ( my $i = 0; $i <= $#output; $i++ )
+	foreach my $line (@output)
 	{
-		my $line = "$output[$i]";
-		installer::logger::print_message( "$line", $force );
-		push( @installer::globals::logfileinfo, $line);
-		push( @installer::globals::errorlogfileinfo, $line);
+		$installer::logger::Info->print($line, $force);
 	}
+
+    # Delete the accumulated error messages.  The @ErrorMessages will now contain
+    # lines caused by printing those error messages.
+    @ErrorMessages = ();
+
+    @installer::globals::errorlogfileinfo = @output;
 	
-	return $contains_error;
+	return $contains_error && ! $ignore_error;
 }
 
 #############################################################
@@ -471,8 +475,8 @@ sub determine_ship_directory
 				$installer::globals::build . "_" . $installer::globals::lastminor . "_" .
 				"native_inprogress-number_" . $languagestring . "\." . $installer::globals::buildid;
 
-	my $infoline = "\nSetting ship directory: $destdir\n";
-	push(@installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->print("\n");
+    $installer::logger::Global->printf("Setting ship directory: %s\n", $destdir);
 	
 	return $destdir;
 }
@@ -489,44 +493,40 @@ sub check_updatepack
 	
 	if ( $ENV{'UPDATER'} )	# the environment variable UPDATER has to be set
 	{
-		$infoline = "\nEnvironment variable UPDATER set\n";
-		push(@installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->print("\n");
+        $installer::logger::Global->print("Environment variable UPDATER set\n");
 
 		if ( ! $ENV{'CWS_WORK_STAMP'} )	# the environment variable CWS_WORK_STAMP must not be set (set only in CWS)
 		{
-			$infoline = "Environment variable CWS_WORK_STAMP not set\n";
-			push(@installer::globals::globallogfileinfo, $infoline);
+            $installer::logger::Global->print("Environment variable CWS_WORK_STAMP not set\n");
 
 			if ( $ENV{'SHIPDRIVE'} )	# the environment variable SHIPDRIVE must be set 
 			{
 				$shipdrive = $ENV{'SHIPDRIVE'};
-				$infoline = "Ship drive defined: $shipdrive\n";
-				push(@installer::globals::globallogfileinfo, $infoline);
+                $installer::logger::Global->printf("Ship drive defined: %s\n", $shipdrive);
 
 				if ( -d $shipdrive )    # SHIPDRIVE must be a directory
 				{
-					$infoline = "Ship drive exists\n";
-					push(@installer::globals::globallogfileinfo, $infoline);
+                    $installer::logger::Global->print("Ship drive exists\n");
 
 					# try to write into $shipdrive
 
-					$directory = $installer::globals::product . "_" . $installer::globals::compiler . "_" . $installer::globals::buildid . "_" . $installer::globals::languageproducts[0] . "_test_$$";
+					my $directory = $installer::globals::product . "_" . $installer::globals::compiler . "_" . $installer::globals::buildid . "_" . $installer::globals::languageproducts[0] . "_test_$$";
 					$directory =~ s/\,/\_/g;	# for the list of languages
 					$directory =~ s/\-/\_/g;	# for en-US, pt-BR, ...
 					$directory = $shipdrive . $installer::globals::separator . $directory;
 
-					$infoline = "Try to create directory: $directory\n";
-					push(@installer::globals::globallogfileinfo, $infoline);
+                    $installer::logger::Global->printf("Try to create directory: %s\n", $directory);
 					
 					# saving this directory for later removal
 					$installer::globals::shiptestdirectory = $directory;
 
 					if ( installer::systemactions::try_to_create_directory($directory))
 					{
-						$infoline = "Write access on Ship drive\n";
-						push(@installer::globals::globallogfileinfo, $infoline);
-						$infoline = "Ship test directory $installer::globals::shiptestdirectory was successfully created\n";
-						push(@installer::globals::globallogfileinfo, $infoline);
+                        $installer::logger::Global->print("Write access on Ship drive\n");
+                        $installer::logger::Global->print(
+                            "Ship test directory %s was successfully created\n",
+                            $installer::globals::shiptestdirectory);
 						my $systemcall = "rmdir $directory";
 						my $returnvalue = system($systemcall);
 						
@@ -537,8 +537,7 @@ sub check_updatepack
 						my $sol_tmp;
 						if ( $ENV{'SOLARENV'} ) { $solarenv = $ENV{'SOLARENV'}; }
 
-						$infoline = "Environment variable SOLARENV: $solarenv\n";
-						push(@installer::globals::globallogfileinfo, $infoline);
+                        $installer::logger::Global->printf("Environment variable SOLARENV: %s\n", $solarenv);
 
 						if ( $ENV{'SOL_TMP'} ) 
                         { 
@@ -547,17 +546,15 @@ sub check_updatepack
                         } else {
                             $infoline = "Environment variable SOL_TMP not set\n";
                         }
-						push(@installer::globals::globallogfileinfo, $infoline);
+                        $installer::logger::Global->print($infoline);
 						
 						if ( defined $sol_tmp && ( $solarenv =~ /^\s*\Q$sol_tmp\E/ ))
 						{
-							$infoline = "Content of SOLARENV starts with the content of SOL_TMP\: Local environment -\> No Updatepack\n";
-							push(@installer::globals::globallogfileinfo, $infoline);						
+                            $installer::logger::Global->print("Content of SOLARENV starts with the content of SOL_TMP\: Local environment -\> No Updatepack\n");
 						}										
 						else
 						{
-							$infoline = "Content of SOLARENV does not start with the content of SOL_TMP: No local environment\n";
-							push(@installer::globals::globallogfileinfo, $infoline);
+							$installer::logger::Global->print("Content of SOLARENV does not start with the content of SOL_TMP: No local environment\n");
 
 							$installer::globals::updatepack = 1;	# That's it
 						}
@@ -566,48 +563,53 @@ sub check_updatepack
 	
 						if ( -d $installer::globals::shiptestdirectory )
 						{
-							$infoline = "Ship test directory $installer::globals::shiptestdirectory still exists. Trying removal later again.\n";
-							push(@installer::globals::globallogfileinfo, $infoline);
+                            $installer::logger::Global->printf(
+                                "Ship test directory %s still exists. Trying removal later again.\n",
+                                $installer::globals::shiptestdirectory);
 						}
 						else
 						{
-							$infoline = "Ship test directory $installer::globals::shiptestdirectory was successfully removed.\n";
-							push(@installer::globals::globallogfileinfo, $infoline);	
+                            $installer::logger::Global->printf(
+                                "Ship test directory %s was successfully removed.\n",
+                                $installer::globals::shiptestdirectory);
 						}	
 					}
 					else
 					{
-						$infoline = "No write access on Ship drive\n";
-						push(@installer::globals::globallogfileinfo, $infoline);
-						$infoline = "Failed to create directory $directory\n";
-						push(@installer::globals::globallogfileinfo, $infoline);
-						if ( defined $ENV{'BSCLIENT'} && ( uc $ENV{'BSCLIENT'} eq 'TRUE' ) ) {
+                        $installer::logger::Global->print("No write access on Ship drive\n");
+                        $installer::logger::Global->printf("Failed to create directory \n", $directory);
+						if ( defined $ENV{'BSCLIENT'} && ( uc $ENV{'BSCLIENT'} eq 'TRUE' ) )
+                        {
 							installer::exiter::exit_program("ERROR: No write access to SHIPDRIVE allthough BSCLIENT is set.", "check_updatepack");
 						}
 					}
 				}
 				else
 				{
-					$infoline = "Ship drive not found: No updatepack\n";
-					push(@installer::globals::globallogfileinfo, $infoline);					
+                    $installer::logger::Global->print("Ship drive not found: No updatepack\n");
 				}
 			}
 			else
 			{
-				$infoline = "Environment variable SHIPDRIVE not set: No updatepack\n";
-				push(@installer::globals::globallogfileinfo, $infoline);				
+                $installer::logger::Global->print("Environment variable SHIPDRIVE not set: No updatepack\n");
 			}
 		}
 		else
 		{
-			$infoline = "Environment variable CWS_WORK_STAMP defined: No updatepack\n";
-			push(@installer::globals::globallogfileinfo, $infoline);			
+            $installer::logger::Global->print("Environment variable CWS_WORK_STAMP defined: No updatepack\n");
 		}
 	}	
 				
-	if ( $installer::globals::updatepack ) { $infoline = "Setting updatepack true\n\n"; }
-	else { $infoline = "\nNo updatepack\n"; }
-	push(@installer::globals::globallogfileinfo, $infoline);
+	if ( $installer::globals::updatepack )
+    {
+        $installer::logger::Global->print("Setting updatepack true\n");
+        $installer::logger::Global->print("\n");
+    }
+	else
+    {
+        $installer::logger::Global->print("\n");
+        $installer::logger::Global->print("No updatepack\n");
+    }
 	
 }
 
@@ -623,8 +625,7 @@ sub read_encodinglist
 
 	if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Did not find Windows encoding list $installer::globals::encodinglistname!", "read_encodinglist"); }
 
-	my $infoline = "Found encoding file: $$fileref\n";
-	push(@installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf("Found encoding file: %s\n", $$fileref);
 		
 	my $encodinglist = installer::files::read_file($$fileref);
 
@@ -720,8 +721,9 @@ sub set_addchildprojects
 		$installer::globals::addchildprojects = 0;	# no child projects for patches
 	}	
 
-	my $infoline = "Value of \$installer::globals::addchildprojects: $installer::globals::addchildprojects\n";
-	push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf(
+        "Value of \$installer::globals::addchildprojects: %s\n",
+        $installer::globals::addchildprojects);
 }
 
 ####################################################################
@@ -738,8 +740,9 @@ sub set_addjavainstaller
 	if ( $installer::globals::languagepack ) { $installer::globals::addjavainstaller = 0; }
 	if ( $allvariableshashref->{'XPDINSTALLER'} ) {	$installer::globals::addjavainstaller = 0; }
 
-	my $infoline = "Value of \$installer::globals::addjavainstaller: $installer::globals::addjavainstaller\n";
-	push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf(
+        "Value of \$installer::globals::addjavainstaller: %s\n",
+        $installer::globals::addjavainstaller);
 }
 
 #######################################################################
@@ -756,8 +759,9 @@ sub set_addsystemintegration
 	if ( $installer::globals::languagepack ) { $installer::globals::addsystemintegration = 0; }
 	if (( $installer::globals::packageformat eq "native" ) || ( $installer::globals::packageformat eq "portable" )) { $installer::globals::addsystemintegration = 0; }
 
-	my $infoline = "Value of \$installer::globals::addsystemintegration: $installer::globals::addsystemintegration\n";
-	push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf(
+        "Value of \$installer::globals::addsystemintegration: %s\n",
+        $installer::globals::addsystemintegration);
 }
 
 1;