Class: Spree::Diagnostics
- Inherits:
-
Object
- Object
- Spree::Diagnostics
- Defined in:
- app/services/spree/diagnostics.rb,
app/services/spree/diagnostics/stack.rb,
app/services/spree/diagnostics/section.rb,
app/services/spree/diagnostics/sections.rb,
app/services/spree/diagnostics/error_log.rb
Overview
An anonymised description of this installation for bug reports: versions, stack, store setup by prefixed ID, providers, changed settings and recent Spree errors. The rake task, the Admin API and the CLI all render this one report, so what a maintainer reads is the same wherever it came from.
report = Spree::Diagnostics.report(store: Spree::Current.store)
puts report.to_markdown
Defined Under Namespace
Modules: Sections, Stack Classes: ErrorLog, Report, Section
Constant Summary collapse
- ISSUE_URL =
'https://github.com/spree/spree/issues/new?template=bug_report.yml'.freeze
- MAX_ISSUE_URL_LENGTH =
GitHub refuses very long URLs; past this the issue form opens empty and the report is pasted by hand.
6000
Class Method Summary collapse
Class Method Details
.report(store: Spree::Store.default, extra_sections: [], errors: true) ⇒ Spree::Diagnostics::Report
101 102 103 104 |
# File 'app/services/spree/diagnostics.rb', line 101 def report(store: Spree::Store.default, extra_sections: [], errors: true) Report.new(generated_at: Time.current, errors: (recent_errors if errors), sections: sections_for(store) + extra_sections.map { |section| extra_section(section) }) end |