occ flag to create a debug report
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
Often when asking someone to run commands to diagnose a problem on their installation, debug log would help understanding the command result. This is especially true for LDAP related issues.
Describe the solution you'd like
Add a general flag to the occ command like --report that:
- Turn on debug log level for the command (same as setting env var NC_loglevel=0)
- Create a report file (zip or txt or json, not sure which is best)
- Put in this report:
- The command and its parameters
- The output of the command and return code
- The log lines from the command execution (all new log lines since the command started is fine)
- If possible the trace of the eventual Exception? Most occ commands have a surrounding try/catch that hides the trace. Maybe the elegant solution here is to log as debug the exception so that it will be in the log.
Describe alternatives you've considered
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the occ command behavior and how the NC_loglevel=0 environment setting enables debug logging. Define the report format and contents, including command parameters, output, return code, new log lines, and any available exception trace; done means the flag produces this diagnostic report for an occ command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100