umbraco / Umbraco.Cloud.Issues

Public issue tracker for Umbraco Cloud
26 stars 2 forks source link

Portal "Error Logs" always empty #728

Open hfloyd opened 8 months ago

hfloyd commented 8 months ago

Issue description

On v9+ sites the "Error Log" in the Portal is always empty - regardless of actual errors shown in the back-office Log Viewer

Portal: image

Back-Office: image

sajumb commented 8 months ago

Hi @hfloyd, Thank you for bringing to our attention the issue regarding the CMS error log in Umbraco v9+.

I'd like to clarify that this behavior is actually by design, stemming from a significant change introduced with Umbraco version 9. In previous versions like v8, the system was configured to store logs in the customer's database. This approach, however, had its drawbacks and was not ideal for various technical reasons.

With the launch of v9, we shifted to a more efficient method, replacing the old log provider configuration with a serialized log file system. This new system does not store logs in the database as before. Implementing the old system would require an additional CMS plugin specifically for this feature, which we decided against in favor of a more streamlined approach.

We are treating this as a feature request and will consider reintroducing this functionality in a future update, possibly in a more refined and context-aware manner than a direct copy of the back-office log.

hfloyd commented 8 months ago

Thanks for the clarification, @sajumb . I do recall the issues even on v7/8 sites with the DB error log getting too big at times. Some additional thoughts:

  1. From a UX perspective, it might make sense to hide the Error Log option in sites where it is not in use, to reduce Customer confusion.
  2. Another option would be to have it just read the site's serilog files directly and only display the "ERROR"+ messages. Perhaps limited to the last 5 days or so. (This would not allow for marking items as "read", of course)
  3. Maybe the functionality could be changed to a flat-file system where on a schedule the site's logs are read, and new Errors are copied into another file, which is what powers the portal display. It would be possible to then mark items as "read", which would update the item in the file with a "read" property, which can be used for UI filtering.
c9mb commented 8 months ago

My personal preference would be a serilog viewer, with "last settings" saved as the next use defaults. That way I can be specific about what I'm looking for, but not be inconvenienced by having to set the conditions each time.