3333use Magento \Framework \Module \ModuleListInterface ;
3434use Magento \Framework \Module \ModuleResource ;
3535use Magento \Framework \Mview \TriggerCleaner ;
36+ use Magento \Framework \Setup \ConsoleLoggerInterface ;
3637use Magento \Framework \Setup \Declaration \Schema \DryRunLogger ;
3738use Magento \Framework \Setup \FilePermissions ;
3839use Magento \Framework \Setup \InstallDataInterface ;
3940use Magento \Framework \Setup \InstallSchemaInterface ;
40- use Magento \Framework \Setup \LoggerInterface ;
4141use Magento \Framework \Setup \ModuleDataSetupInterface ;
4242use Magento \Framework \Setup \Patch \PatchApplier ;
4343use Magento \Framework \Setup \Patch \PatchApplierFactory ;
@@ -136,7 +136,7 @@ class Installer
136136 /**
137137 * Logger
138138 *
139- * @var LoggerInterface
139+ * @var ConsoleLoggerInterface
140140 */
141141 private $ log ;
142142
@@ -269,7 +269,7 @@ class Installer
269269 * @param ModuleListInterface $moduleList
270270 * @param ModuleLoader $moduleLoader
271271 * @param AdminAccountFactory $adminAccountFactory
272- * @param LoggerInterface $log
272+ * @param ConsoleLoggerInterface $log
273273 * @param ConnectionFactory $connectionFactory
274274 * @param MaintenanceMode $maintenanceMode
275275 * @param Filesystem $filesystem
@@ -294,7 +294,7 @@ public function __construct(
294294 ModuleListInterface $ moduleList ,
295295 ModuleLoader $ moduleLoader ,
296296 AdminAccountFactory $ adminAccountFactory ,
297- LoggerInterface $ log ,
297+ ConsoleLoggerInterface $ log ,
298298 ConnectionFactory $ connectionFactory ,
299299 MaintenanceMode $ maintenanceMode ,
300300 Filesystem $ filesystem ,
@@ -394,7 +394,7 @@ public function install($request)
394394 $ total = count ($ script ) + 4 * count (array_filter ($ estimatedModules ));
395395 $ this ->progress = new Installer \Progress ($ total , 0 );
396396
397- $ this ->log ->log ('Starting Magento installation: ' );
397+ $ this ->log ->logMeta ('Starting Magento installation: ' );
398398
399399 foreach ($ script as $ item ) {
400400 /* Note: Because the $this->DeploymentConfig gets written to, but plugins use $this->firstDeploymentConfig,
@@ -912,7 +912,7 @@ public function installSchema(array $request)
912912 $ this ->setupModuleRegistry ($ setup );
913913 $ this ->setupCoreTables ($ setup );
914914 $ this ->cleanMemoryTables ($ setup );
915- $ this ->log ->log ('Schema creation/updates: ' );
915+ $ this ->log ->logMeta ('Schema creation/updates: ' );
916916 $ this ->declarativeInstallSchema ($ request );
917917 $ this ->handleDBSchemaData ($ setup , 'schema ' , $ request );
918918 /** @var Mysql $adapter */
@@ -960,7 +960,7 @@ public function installDataFixtures(array $request = [])
960960 $ this ->assertDbAccessible ();
961961 $ setup = $ this ->dataSetupFactory ->create ();
962962 $ this ->checkFilePermissionsForDbUpgrade ();
963- $ this ->log ->log ('Data install/update: ' );
963+ $ this ->log ->logMeta ('Data install/update: ' );
964964
965965 $ this ->handleDBSchemaData ($ setup , 'data ' , $ request );
966966
@@ -1054,7 +1054,7 @@ private function handleDBSchemaData($setup, $type, array $request)
10541054 if ($ status == \Magento \Framework \Setup \ModuleDataSetupInterface::VERSION_COMPARE_GREATER ) {
10551055 $ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
10561056 if ($ upgrader ) {
1057- $ this ->log ->logInline ("Upgrading $ type.. " );
1057+ $ this ->log ->logMetaInline ("Upgrading $ type.. " );
10581058 $ upgrader ->upgrade ($ setup , $ moduleContextList [$ moduleName ]);
10591059 if ($ type === 'schema ' ) {
10601060 $ resource ->setDbVersion ($ moduleName , $ configVer );
@@ -1066,12 +1066,12 @@ private function handleDBSchemaData($setup, $type, array $request)
10661066 } elseif ($ configVer ) {
10671067 $ installer = $ this ->getSchemaDataHandler ($ moduleName , $ installType );
10681068 if ($ installer ) {
1069- $ this ->log ->logInline ("Installing $ type... " );
1069+ $ this ->log ->logMetaInline ("Installing $ type... " );
10701070 $ installer ->install ($ setup , $ moduleContextList [$ moduleName ]);
10711071 }
10721072 $ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
10731073 if ($ upgrader ) {
1074- $ this ->log ->logInline ("Upgrading $ type... " );
1074+ $ this ->log ->logMetaInline ("Upgrading $ type... " );
10751075 $ upgrader ->upgrade ($ setup , $ moduleContextList [$ moduleName ]);
10761076 }
10771077 }
@@ -1097,9 +1097,9 @@ private function handleDBSchemaData($setup, $type, array $request)
10971097 }
10981098
10991099 if ($ type === 'schema ' ) {
1100- $ this ->log ->log ('Schema post-updates: ' );
1100+ $ this ->log ->logMeta ('Schema post-updates: ' );
11011101 } elseif ($ type === 'data ' ) {
1102- $ this ->log ->log ('Data post-updates: ' );
1102+ $ this ->log ->logMeta ('Data post-updates: ' );
11031103 }
11041104 $ handlerType = $ type === 'schema ' ? 'schema-recurring ' : 'data-recurring ' ;
11051105
@@ -1112,7 +1112,7 @@ private function handleDBSchemaData($setup, $type, array $request)
11121112 $ this ->log ->log ("Module ' {$ moduleName }': " );
11131113 $ modulePostUpdater = $ this ->getSchemaDataHandler ($ moduleName , $ handlerType );
11141114 if ($ modulePostUpdater ) {
1115- $ this ->log ->logInline ('Running ' . str_replace ('- ' , ' ' , $ handlerType ) . '... ' );
1115+ $ this ->log ->logMetaInline ('Running ' . str_replace ('- ' , ' ' , $ handlerType ) . '... ' );
11161116 $ modulePostUpdater ->install ($ setup , $ moduleContextList [$ moduleName ]);
11171117 }
11181118 $ this ->logProgress ();
@@ -1367,7 +1367,7 @@ public function updateModulesSequence($keepGeneratedFiles = false)
13671367 if (!$ keepGeneratedFiles ) {
13681368 $ this ->cleanupGeneratedFiles ();
13691369 }
1370- $ this ->log ->log ('Updating modules: ' );
1370+ $ this ->log ->logMeta ('Updating modules: ' );
13711371 $ this ->createModulesConfig ([]);
13721372 }
13731373
@@ -1389,7 +1389,7 @@ public function getModulesConfig()
13891389 */
13901390 public function uninstall ()
13911391 {
1392- $ this ->log ->log ('Starting Magento uninstallation: ' );
1392+ $ this ->log ->logMeta ('Starting Magento uninstallation: ' );
13931393
13941394 try {
13951395 $ this ->cleanCaches ();
@@ -1403,7 +1403,7 @@ public function uninstall()
14031403
14041404 $ this ->cleanupDb ();
14051405
1406- $ this ->log ->log ('File system cleanup: ' );
1406+ $ this ->log ->logMeta ('File system cleanup: ' );
14071407 $ messages = $ this ->cleanupFiles ->clearAllFiles ();
14081408 foreach ($ messages as $ message ) {
14091409 $ this ->log ->log ($ message );
@@ -1454,7 +1454,7 @@ private function cleanCaches()
14541454 $ cacheManager = $ this ->objectManagerProvider ->get ()->get (Manager::class);
14551455 $ types = $ cacheManager ->getAvailableTypes ();
14561456 $ cacheManager ->clean ($ types );
1457- $ this ->log ->log ('Cache cleared successfully ' );
1457+ $ this ->log ->logSuccess ('Cache cleared successfully ' );
14581458 }
14591459
14601460 /**
@@ -1471,7 +1471,7 @@ private function flushCaches($types = [])
14711471 $ cacheManager = $ this ->objectManagerProvider ->get ()->get (Manager::class);
14721472 $ types = empty ($ types ) ? $ cacheManager ->getAvailableTypes () : $ types ;
14731473 $ cacheManager ->flush ($ types );
1474- $ this ->log ->log ('Cache types ' . implode (', ' , $ types ) . ' flushed successfully ' );
1474+ $ this ->log ->logSuccess ('Cache types ' . implode (', ' , $ types ) . ' flushed successfully ' );
14751475 }
14761476
14771477 /**
@@ -1703,7 +1703,7 @@ private function generateListOfModuleContext($resource, $type)
17031703 */
17041704 private function cleanupGeneratedFiles ()
17051705 {
1706- $ this ->log ->log ('File system cleanup: ' );
1706+ $ this ->log ->logMeta ('File system cleanup: ' );
17071707 $ messages = $ this ->cleanupFiles ->clearCodeGeneratedFiles ();
17081708
17091709 // unload Magento autoloader because it may be using compiled definition
0 commit comments