New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[upgrade] show timestamp for output during upgrade #17093
Conversation
*/ | ||
protected function writeln(OutputInterface $output, $line) { | ||
$time = new \DateTime(); | ||
$t = $time->format(\DateTime::ISO8601); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make use of logdateformat
and logtimezone
from system config?
1231d82
to
ee1a441
Compare
@nickvergessen fixed. |
$t = ''; | ||
if($this->showTimestamp) { | ||
$time = new \DateTime(); | ||
$t = $time->format(\DateTime::ISO8601) . ' '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reactivating my comment:
Should we make use of logdateformat
and logtimezone
from system config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed
I can foresee a problem we might have if we try to extend this in the future - if a subclass wants an |
@Xenopathic Thanks for the pointer :) |
@@ -110,6 +126,12 @@ protected function execute(InputInterface $input, OutputInterface $output) { | |||
} | |||
|
|||
if(\OC::checkUpgrade(false)) { | |||
if ($input->getOption('show-timestamp')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could also just use a verbosity level for this or default to true. It does not really hurt to have it. but you can't have it retro-actively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MorrisJobke what do you think?
Nice, looks like clean code to me! (apart from the above comments of course) |
51f44b0
to
42ffb39
Compare
@MorrisJobke @Xenopathic should be up to date now, I replaced the additional option with a check for verbosity, I hope that's fine |
@nickvergessen Thanks |
|
* added --show-timestamp option
42ffb39
to
dba5d5e
Compare
A new inspection was created. |
rebased due to #17095 |
As this was nearly completely rewritten by @nickvergessen : I tested this and it works, thanks |
stable8.1 is created -> merge |
[upgrade] show timestamp for output during upgrade
cc @LukasReschke @DeepDiver1975 @nickvergessen @rullzer @Xenopathic