@@ -79,6 +79,13 @@ protected function configure()
7979 InputOption::VALUE_REQUIRED ,
8080 'Path where any errors should be saved '
8181 )
82+ ->addOption (
83+ 'error-output-format ' ,
84+ null ,
85+ InputOption::VALUE_REQUIRED ,
86+ 'The output format for errors on std out ' ,
87+ Configuration::OUTPUT_FORMAT_CONSOLE
88+ )
8289 ->addOption (
8390 'no-theme ' ,
8491 null ,
@@ -137,7 +144,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
137144 KernelFactory::createKernel ($ this ->buildConfig , $ this ->urlChecker ?? null )
138145 );
139146
140- $ this ->addProgressListener ($ builder ->getConfiguration ()->getEventManager ());
147+ $ configuration = $ builder ->getConfiguration ();
148+ $ configuration ->setOutputFormat ($ input ->getOption ('error-output-format ' ));
149+ $ this ->addProgressListener ($ configuration ->getEventManager ());
141150
142151 $ builder ->build (
143152 $ this ->buildConfig ->getContentDir (),
@@ -159,7 +168,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
159168 }
160169
161170 $ filesystem = new Filesystem ();
162- $ filesystem ->dumpFile ($ logPath , implode ("\n" , $ buildErrors ));
171+ $ filesystem ->dumpFile ($ logPath , implode ("\n" , array_map ( fn ( $ error ) => is_string ( $ error ) ? $ error : $ error -> asString (), $ buildErrors) ));
163172 }
164173
165174 $ metas = $ builder ->getMetas ();
0 commit comments