Problem/Motivation

The sensor dblog_image_missing_style has cryptic verbose output.

Now we have a nice verbose table element.

Proposed resolution

From the output of dblog_image_missing_style, also load the related file (similar to the sensor message) and load the related entity.

Output a unaggregated table with
- wid
- referer
- the resource URL
- timestamp

Remaining tasks

User interface changes

API changes

Data model changes

Comments

miro_dietiker created an issue. See original summary.

edurenye’s picture

Issue summary: View changes
StatusFileSize
new5.92 KB

I'm uploading this patch just to show some problems that appeared and we discussed.
And also to have the code saved if we want to add an agregated result.
In this patch I'm showing the entity type, entity id, entity laben with link and the resource URL all the ussages for all the errors.

This doesn't make sense as we have duplicated info and the errors without ussages are not shown.
But without the usages we can't get the type, the id or the label.

So me and @miro_dietiker agreed in for the moment in this issue add just an unaggregated result with wid, the referer in case this exist, the recource url and the timestamp.

miro_dietiker’s picture

In my words... ;-)

Yeah, the unaggregated result (if any) should be pretty near to the original watchdog records. Things might be highly repetitive and the timestamp is possibly most important.
I asked to once try enabling typical verbose_fields and stick with typical Watchdog output...

The whole debate we entered about usage, ... is a completely different aspect:
It is more subject for a second verbose table that shows the aggregated results with counts and possibly other data... Because every URL only appears once.
(And also don't forget here to display the max(timestamp)..)

edurenye’s picture

Status: Active » Needs review
StatusFileSize
new45.9 KB
new7.62 KB

I think the aggregated results should go to a followup.
Done, I also added results for this plugin to the demo.

Here you can see the result:

As you can see, this is the result of the demo.
I really don't like that the message says "1 watchdog entries in 1 day" when you can see that there are more entries, maybe we might change the text of the message, or make it count all entries not just the ones of the image with more errors. What do you think?

miro_dietiker’s picture

Title: improve verbose output of image derivative creation sensor » Add unaggregated verbose output of image derivative creation sensor
Status: Needs review » Needs work

Looks pretty good.

I agree adding the grouped thing into a followup.
However then please don't drop the (already available) verbose usage export that is more related to the aggregated output than the unaggregated one.
So i think resultVerbose should stay mostly unchanged.

Please create the followup and provide a link.

+++ b/modules/demo/monitoring_demo.install
@@ -86,6 +86,30 @@ function monitoring_demo_install() {
+  \Drupal::service('logger.dblog')->log(LOG_NOTICE,
+    'Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', [
...
+  \Drupal::logger('image')->notice('Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', [

Why writing the same record type in two different ways?

edurenye’s picture

Created the followup #2614000: Add aggregated table verbose output of image derivative creation sensor

I changed the first log as with the previous way to add the log I can't set the referer, and I wanted to add one as example.

miro_dietiker’s picture

Please add a comment to explain this where you write it. ;-)

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new6.96 KB
new3.39 KB

Readed resultVerbose and the comment.

edurenye’s picture

StatusFileSize
new6.97 KB

Rebased.

miro_dietiker’s picture

Status: Needs review » Fixed

Committed. :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.