Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
- Logged errors are confusing for users, if the module recovered from them.
- (Too) Many debug messages are logged and shown by dblog.module (by default in D7; not filterable in D6).
- Primary logged message is not clear.
Goal
- Log only one message per request (or high-level action performed).
- Make the single log entry show the primary message first.
- Retain additional messages within the single log message (i.e., append them).
Details
- Mollom produces a lot of log messages. Mainly for debugging purposes in case of errors or when a post is treated inappropriately.
- A single Drupal request may trigger multiple Mollom requests being logged, as well as "functional/primary" log messages generated by the business logic of the module (e.g., "Unsure: %teaser").
- Users complain about the amount of log messages. The amount is not an issue for syslog, but can be an issue for dblog on large-scale sites.
- The module recovers from certain errors, but it also logs any errors that occur, regardless of whether the final operation is successful or not.
- Most logged messages are debug messages, primarily important for functional module tests.
- For Mollom support requests, it is helpful to see the entire stack of operations that were attempted.
- Most messages are logged within form processing, but some others are logged outside of the Form API scope.
E.g., when an entity gets ultimately inserted or deleted, my.mollom.com may be informed about that, which triggers a separate log message.
- The original cause for this issue is obsolete, since the client-side server fail-over logic has been removed.
OP by @Dries
When looking at the watchdog, it is not clear that the fail-over is working. Quite the contrary, people might believe that Mollom might be down or broken because they sometimes see error messages. I think we should make it more clear that the fail-over is working.
Comment | File | Size | Author |
---|---|---|---|
#10 | mollom.log_.9.patch | 34.92 KB | sun |
#9 | mollom.log_.9.patch | 34.92 KB | sun |
#7 | mollom.log_.7.patch | 21.05 KB | sun |
#3 | mollom.watchdog-debug.3.patch | 975 bytes | sun |
#1 | error.jpg | 230.31 KB | Dries |
Comments
Comment #1
Dries CreditAttribution: Dries commentedComment #2
sunRelated: #1096550: Mollom watchdog logs - optional
Comment #3
sunAttached patch should fix this issue by hiding non-severe log messages.
We can't really do much on 2), since dblog's theme function enables the $wordsafe parameter of truncate_utf8()... we're already doing the best we can do to improve the message summaries in the overview :(
Comment #4
Dries CreditAttribution: Dries commentedMaybe instead of a setting called
mollom_testing_mode
we should have another setting likemollom_verbose_debug
?Here are two reasons why:
1) As a Mollom developer, I'd want to see the extra information on a production site.
2) As a Mollom developer or support engineer, I'd want to tell Mollom users to provide me additional debug information on a production site
Comment #5
sunAs mentioned in #903770-10: Integrate with Mollom moderation:
Comment #6
sunComment #6.0
sunUpdated issue summary.
Comment #6.1
sunUpdated issue summary.
Comment #6.2
sunUpdated issue summary.
Comment #7
sunAlright, this was a lot more work than originally estimated. After experimenting with 2-3 prototypes, I had to come back to this issue and write down the precise problems/goals/details in the issue summary in order to make sense of the task.
Not 100% complete yet, but attached patch works.
Comment #9
sunFinal conversion of everything, more docs, and resolved todos.
Comment #10
sunTestbot seems to be stuck on that patch for some unknown reason.
@see #1460784: XMLRPC failing between testbot and qa
Comment #11
sunRan tests manually and committed to 7.x-2.x.
Comment #12
sunCommitted to 6.x-2.x, too.
Comment #13.0
(not verified) CreditAttribution: commentedUpdated issue summary.