Skip to content

Commit

Permalink
Merge pull request #1095 from M0rgan01/improve-log-format
Browse files Browse the repository at this point in the history
[CLI] Add stack trace in logs when exception
  • Loading branch information
M0rgan01 authored Jan 9, 2025
2 parents 214adb2 + 8c847d5 commit 51d7764
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion classes/Commands/CheckNewVersionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return ExitCode::SUCCESS;
} catch (Exception $e) {
$this->logger->error('An error occurred during the check new version process');
$this->logger->error("An error occurred during the check new version process:\n" . $e);
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Commands/CheckRequirementsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return $this->exitCode;
} catch (Exception $e) {
$this->logger->error('An error occurred during the check requirements process');
$this->logger->error("An error occurred during the check requirements process:\n" . $e);
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Commands/CreateBackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return $exitCode;
} catch (Exception $e) {
$this->logger->error('An error occurred during the backup creation process');
$this->logger->error("An error occurred during the backup creation process::\n" . $e);
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Commands/DeleteBackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return $exitCode;
} catch (Exception $e) {
$this->logger->error('An error occurred during the delete backup process');
$this->logger->error("An error occurred during the delete backup process:\n" . $e);
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Commands/ListBackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return ExitCode::SUCCESS;
} catch (Exception $e) {
$this->logger->error('An error occurred during the backup listing process');
$this->logger->error("An error occurred during the backup listing process:\n" . $e);
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Commands/RestoreCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return $exitCode;
} catch (Exception $e) {
$this->logger->error('An error occurred during the restoration process');
$this->logger->error("An error occurred during the restoration process:\n" . $e);
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Commands/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int

return $this->chainCommand($output);
} catch (Exception $e) {
$this->logger->error('An error occurred during the update process');
$this->logger->error("An error occurred during the update process:\n" . $e);
throw $e;
}
}
Expand Down

0 comments on commit 51d7764

Please sign in to comment.