-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
occ commands to manage logging #18369
Conversation
Very cool and useful!! 👍 |
It'd be nice if the CI build slave didn't shutdown while testing this... I'll try again in the morning. |
|
@DeepDiver1975 STOP PLAYING AROUND WITH THE CI SYSTEM! |
if (is_numeric($level)) { | ||
$levelNum = $level; | ||
// sanity check | ||
$level = $this->convertLevelNumber($levelNum); |
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.
$level is unused
I'd like to see unit test on these new commands - THX |
log:manage can set/display the log backend, log level and log timezone
log:owncloud can set/display the log filename and log file rotation size
8fb12fb
to
2663f12
Compare
A new inspection was created. |
@@ -493,9 +493,10 @@ | |||
'log_type' => 'owncloud', | |||
|
|||
/** | |||
* Change the ownCloud logfile name from ``owncloud.log`` to something else. |
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.
@carlaschroder please review these changes since the will be re-used in the documentation
👍 Now all I'm missing is another command "./occ log:human" that outputs the log in a properly formatted way, with nicely presented stack traces (I'm tired of manually reformatting stack traces in bug reports) |
@PVince81 Getting there 😄 |
Tested and works 👍 |
occ commands to manage logging
In similar vein to the maintenance:* commands and others, this PR introduces two new occ commands, log:manage and log:owncloud. It takes away the requirement to look at the documentation to change logging settings.
log:manage allows the following information to be set/displayed: logging backend (owncloud, errorlog, syslog), log level and log timezone.
log:owncloud manages the owncloud logging backend, and can be used to set/display: log filename and log rotation size. These are parameters specific to the owncloud backend, and so get their own command
@PVince81 we discussed this briefly
cc @DeepDiver1975 @MorrisJobke @LukasReschke