33
33
use Magento \Framework \Module \ModuleListInterface ;
34
34
use Magento \Framework \Module \ModuleResource ;
35
35
use Magento \Framework \Mview \TriggerCleaner ;
36
+ use Magento \Framework \Setup \ConsoleLoggerInterface ;
36
37
use Magento \Framework \Setup \Declaration \Schema \DryRunLogger ;
37
38
use Magento \Framework \Setup \FilePermissions ;
38
39
use Magento \Framework \Setup \InstallDataInterface ;
39
40
use Magento \Framework \Setup \InstallSchemaInterface ;
40
- use Magento \Framework \Setup \LoggerInterface ;
41
41
use Magento \Framework \Setup \ModuleDataSetupInterface ;
42
42
use Magento \Framework \Setup \Patch \PatchApplier ;
43
43
use Magento \Framework \Setup \Patch \PatchApplierFactory ;
@@ -136,7 +136,7 @@ class Installer
136
136
/**
137
137
* Logger
138
138
*
139
- * @var LoggerInterface
139
+ * @var ConsoleLoggerInterface
140
140
*/
141
141
private $ log ;
142
142
@@ -269,7 +269,7 @@ class Installer
269
269
* @param ModuleListInterface $moduleList
270
270
* @param ModuleLoader $moduleLoader
271
271
* @param AdminAccountFactory $adminAccountFactory
272
- * @param LoggerInterface $log
272
+ * @param ConsoleLoggerInterface $log
273
273
* @param ConnectionFactory $connectionFactory
274
274
* @param MaintenanceMode $maintenanceMode
275
275
* @param Filesystem $filesystem
@@ -294,7 +294,7 @@ public function __construct(
294
294
ModuleListInterface $ moduleList ,
295
295
ModuleLoader $ moduleLoader ,
296
296
AdminAccountFactory $ adminAccountFactory ,
297
- LoggerInterface $ log ,
297
+ ConsoleLoggerInterface $ log ,
298
298
ConnectionFactory $ connectionFactory ,
299
299
MaintenanceMode $ maintenanceMode ,
300
300
Filesystem $ filesystem ,
@@ -394,7 +394,7 @@ public function install($request)
394
394
$ total = count ($ script ) + 4 * count (array_filter ($ estimatedModules ));
395
395
$ this ->progress = new Installer \Progress ($ total , 0 );
396
396
397
- $ this ->log ->log ('Starting Magento installation: ' );
397
+ $ this ->log ->logMeta ('Starting Magento installation: ' );
398
398
399
399
foreach ($ script as $ item ) {
400
400
/* Note: Because the $this->DeploymentConfig gets written to, but plugins use $this->firstDeploymentConfig,
@@ -912,7 +912,7 @@ public function installSchema(array $request)
912
912
$ this ->setupModuleRegistry ($ setup );
913
913
$ this ->setupCoreTables ($ setup );
914
914
$ this ->cleanMemoryTables ($ setup );
915
- $ this ->log ->log ('Schema creation/updates: ' );
915
+ $ this ->log ->logMeta ('Schema creation/updates: ' );
916
916
$ this ->declarativeInstallSchema ($ request );
917
917
$ this ->handleDBSchemaData ($ setup , 'schema ' , $ request );
918
918
/** @var Mysql $adapter */
@@ -960,7 +960,7 @@ public function installDataFixtures(array $request = [])
960
960
$ this ->assertDbAccessible ();
961
961
$ setup = $ this ->dataSetupFactory ->create ();
962
962
$ this ->checkFilePermissionsForDbUpgrade ();
963
- $ this ->log ->log ('Data install/update: ' );
963
+ $ this ->log ->logMeta ('Data install/update: ' );
964
964
965
965
$ this ->handleDBSchemaData ($ setup , 'data ' , $ request );
966
966
@@ -1054,7 +1054,7 @@ private function handleDBSchemaData($setup, $type, array $request)
1054
1054
if ($ status == \Magento \Framework \Setup \ModuleDataSetupInterface::VERSION_COMPARE_GREATER ) {
1055
1055
$ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
1056
1056
if ($ upgrader ) {
1057
- $ this ->log ->logInline ("Upgrading $ type.. " );
1057
+ $ this ->log ->logMetaInline ("Upgrading $ type.. " );
1058
1058
$ upgrader ->upgrade ($ setup , $ moduleContextList [$ moduleName ]);
1059
1059
if ($ type === 'schema ' ) {
1060
1060
$ resource ->setDbVersion ($ moduleName , $ configVer );
@@ -1066,12 +1066,12 @@ private function handleDBSchemaData($setup, $type, array $request)
1066
1066
} elseif ($ configVer ) {
1067
1067
$ installer = $ this ->getSchemaDataHandler ($ moduleName , $ installType );
1068
1068
if ($ installer ) {
1069
- $ this ->log ->logInline ("Installing $ type... " );
1069
+ $ this ->log ->logMetaInline ("Installing $ type... " );
1070
1070
$ installer ->install ($ setup , $ moduleContextList [$ moduleName ]);
1071
1071
}
1072
1072
$ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
1073
1073
if ($ upgrader ) {
1074
- $ this ->log ->logInline ("Upgrading $ type... " );
1074
+ $ this ->log ->logMetaInline ("Upgrading $ type... " );
1075
1075
$ upgrader ->upgrade ($ setup , $ moduleContextList [$ moduleName ]);
1076
1076
}
1077
1077
}
@@ -1097,9 +1097,9 @@ private function handleDBSchemaData($setup, $type, array $request)
1097
1097
}
1098
1098
1099
1099
if ($ type === 'schema ' ) {
1100
- $ this ->log ->log ('Schema post-updates: ' );
1100
+ $ this ->log ->logMeta ('Schema post-updates: ' );
1101
1101
} elseif ($ type === 'data ' ) {
1102
- $ this ->log ->log ('Data post-updates: ' );
1102
+ $ this ->log ->logMeta ('Data post-updates: ' );
1103
1103
}
1104
1104
$ handlerType = $ type === 'schema ' ? 'schema-recurring ' : 'data-recurring ' ;
1105
1105
@@ -1112,7 +1112,7 @@ private function handleDBSchemaData($setup, $type, array $request)
1112
1112
$ this ->log ->log ("Module ' {$ moduleName }': " );
1113
1113
$ modulePostUpdater = $ this ->getSchemaDataHandler ($ moduleName , $ handlerType );
1114
1114
if ($ modulePostUpdater ) {
1115
- $ this ->log ->logInline ('Running ' . str_replace ('- ' , ' ' , $ handlerType ) . '... ' );
1115
+ $ this ->log ->logMetaInline ('Running ' . str_replace ('- ' , ' ' , $ handlerType ) . '... ' );
1116
1116
$ modulePostUpdater ->install ($ setup , $ moduleContextList [$ moduleName ]);
1117
1117
}
1118
1118
$ this ->logProgress ();
@@ -1367,7 +1367,7 @@ public function updateModulesSequence($keepGeneratedFiles = false)
1367
1367
if (!$ keepGeneratedFiles ) {
1368
1368
$ this ->cleanupGeneratedFiles ();
1369
1369
}
1370
- $ this ->log ->log ('Updating modules: ' );
1370
+ $ this ->log ->logMeta ('Updating modules: ' );
1371
1371
$ this ->createModulesConfig ([]);
1372
1372
}
1373
1373
@@ -1389,7 +1389,7 @@ public function getModulesConfig()
1389
1389
*/
1390
1390
public function uninstall ()
1391
1391
{
1392
- $ this ->log ->log ('Starting Magento uninstallation: ' );
1392
+ $ this ->log ->logMeta ('Starting Magento uninstallation: ' );
1393
1393
1394
1394
try {
1395
1395
$ this ->cleanCaches ();
@@ -1403,7 +1403,7 @@ public function uninstall()
1403
1403
1404
1404
$ this ->cleanupDb ();
1405
1405
1406
- $ this ->log ->log ('File system cleanup: ' );
1406
+ $ this ->log ->logMeta ('File system cleanup: ' );
1407
1407
$ messages = $ this ->cleanupFiles ->clearAllFiles ();
1408
1408
foreach ($ messages as $ message ) {
1409
1409
$ this ->log ->log ($ message );
@@ -1454,7 +1454,7 @@ private function cleanCaches()
1454
1454
$ cacheManager = $ this ->objectManagerProvider ->get ()->get (Manager::class);
1455
1455
$ types = $ cacheManager ->getAvailableTypes ();
1456
1456
$ cacheManager ->clean ($ types );
1457
- $ this ->log ->log ('Cache cleared successfully ' );
1457
+ $ this ->log ->logSuccess ('Cache cleared successfully ' );
1458
1458
}
1459
1459
1460
1460
/**
@@ -1471,7 +1471,7 @@ private function flushCaches($types = [])
1471
1471
$ cacheManager = $ this ->objectManagerProvider ->get ()->get (Manager::class);
1472
1472
$ types = empty ($ types ) ? $ cacheManager ->getAvailableTypes () : $ types ;
1473
1473
$ cacheManager ->flush ($ types );
1474
- $ this ->log ->log ('Cache types ' . implode (', ' , $ types ) . ' flushed successfully ' );
1474
+ $ this ->log ->logSuccess ('Cache types ' . implode (', ' , $ types ) . ' flushed successfully ' );
1475
1475
}
1476
1476
1477
1477
/**
@@ -1703,7 +1703,7 @@ private function generateListOfModuleContext($resource, $type)
1703
1703
*/
1704
1704
private function cleanupGeneratedFiles ()
1705
1705
{
1706
- $ this ->log ->log ('File system cleanup: ' );
1706
+ $ this ->log ->logMeta ('File system cleanup: ' );
1707
1707
$ messages = $ this ->cleanupFiles ->clearCodeGeneratedFiles ();
1708
1708
1709
1709
// unload Magento autoloader because it may be using compiled definition
0 commit comments