-
Notifications
You must be signed in to change notification settings - Fork 27
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
allow printing log messages during occ #873
Conversation
Related to nextcloud/server#30989 |
f058cdb
to
675f339
Compare
f778fdf
to
647fed2
Compare
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.
with non-blocking comments
|
||
public function log(int $level, string $app, array $entry) { | ||
if ($level >= $this->level) { | ||
$messageWidth = $this->terminalWidth - 8 - 18 - 6; |
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.
magic numbers (and in following lines are more magic numbers)
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.
They are the column widths that "seem to work best"
Same number as
logreader/lib/Command/Tail.php
Line 75 in 0718de6
$messageWidth = $totalWidth - 8 - 18 - 26 - 6; |
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.
Better kept in named constants imo. Anyway, not blocking, up to you.
Signed-off-by: Robin Appelman <[email protected]>
647fed2
to
22192c2
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #873 +/- ##
=============================================
- Coverage 42.26% 20.00% -22.27%
- Complexity 139 159 +20
=============================================
Files 23 15 -8
Lines 601 480 -121
Branches 31 0 -31
=============================================
- Hits 254 96 -158
- Misses 347 384 +37
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: Robin Appelman <[email protected]>
22192c2
to
1cf6534
Compare
/backport to stable27 |
/backport to stable26 |
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
By setting
OCC_LOG=<level>
all log messages created while running the command will be printed tostderr
.