Review main Merged

51238[FEATURE] Add button to delete similar errors from sys_log

Mathias Schreiber CR +2 V +2 Normal +93 −2 updated 01/11/17, 11:49

Commit message

The log module of TYPO3 now shows a button to delete multiple errors at once based on
the `details` field of the `sys_log` table.
This comes in handy when you fixed an error that spammed the log before.

Review

  • Code review CR +2
    • Susi Moog +2
    • Christian Kuhn +1
  • Verified V +2
    • Susi Moog +2
    • Christian Kuhn +1
    • TYPO3com +1 CI

Issues 1

Files 7

Review log 3550

Show 1725 earlier messages
  1. Mathias Schreiber uploaded patch set 1 01/10/17, 13:40

  2. Mathias Schreiber updated the commit message in patch set 2 01/10/17, 13:41

  3. TYPO3com voted on patch set 1 V -1 01/10/17, 13:45 Completed build in 04m 48s on Tue, 10 Jan, 02:45 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6397

  4. TYPO3com voted on patch set 2 V -1 01/10/17, 13:46 Completed build in 05m 09s on Tue, 10 Jan, 02:46 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6398

  5. Mathias Schreiber uploaded patch set 3 01/10/17, 13:49

  6. TYPO3com voted on patch set 3 V +1 01/10/17, 13:53 Completed build in 04m 18s on Tue, 10 Jan, 02:53 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6400

  7. Michael Oehlhof commented on patch set 3 01/10/17, 14:26

    Similar errors are not deleted, only the same. I would either change the naming or enhance the query if possible. I have some similar errors in my log which only differ in an ajaxToken in the log message. It would be great if they could be deleted with the new button.
  8. Susi Moog commented on patch set 3 01/10/17, 15:18

    As the core has more than one method actually writing to the sys_log table with _very_ inconsistent usage of details_nr there is currently no way to cleanly identify similar errors. That would only be possible after a massive refactoring of this area of TYPO3. I agree that the naming is kind of confusing, I also wondered why closely the same looking errors were not deleted when pressing the button. I'd propose to change it to something more clear like - Delete errors with same message - Delete all errors like this -... ?
  9. Stephan Großberndt commented on patch set 4 01/10/17, 15:23

    Published edit on patch set 3.
  10. TYPO3com voted on patch set 4 V -1 01/10/17, 15:28 Completed build in 04m 36s on Tue, 10 Jan, 04:28 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6402

  11. Stephan Großberndt commented on patch set 4 01/10/17, 15:28

    This depends on the sys_log "details" and "data" fields. If the "details" contain placeholders like %s which are vsprintf'd with contents of "data", contents of "details" is the same for multiple messages. I guess the problem with those ajaxToken messages is they are written directly to "details" instead of using "data". The fix there would rather be to put the ajaxToken into "data".
  12. Stephan Großberndt commented on patch set 5 01/10/17, 15:29

    Published edit on patch set 4.
  13. Susi Moog commented on patch set 5 01/10/17, 15:33

    SQL errors are logged via "SQL error: '%s' (%s)" which in turn means: once you press that button all SQL errors that have ever happened no matter where disappear, don't they?
  14. TYPO3com voted on patch set 5 V +1 01/10/17, 15:34 Completed build in 04m 50s on Tue, 10 Jan, 04:34 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6403

  15. Stephan Großberndt commented on patch set 5 01/10/17, 15:38

    Yes. So deleting only based on "details" is wrong. Using the complete vsprintf'd string will lead to not being able to delete similar messages - the hard part is defining the similarity.
  16. Susi Moog commented on patch set 5 CR -2 01/10/17, 15:50

    just talked with Mattes who has an idea on how to fix it. Blocking until he does ;)
  17. Mathias Schreiber uploaded patch set 6 01/10/17, 17:01

  18. TYPO3com voted on patch set 6 V +1 01/10/17, 17:06 Completed build in 05m 06s on Tue, 10 Jan, 06:06 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6405

  19. Mathias Schreiber uploaded patch set 7 01/10/17, 17:55

  20. TYPO3com voted on patch set 7 V -1 01/10/17, 18:00 Completed build in 04m 33s on Tue, 10 Jan, 06:59 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6408

  21. Mathias Schreiber uploaded patch set 8 01/10/17, 18:18

  22. Susi Moog voted on patch set 8 CR +1 01/10/17, 18:18

  23. TYPO3com voted on patch set 8 V +1 01/10/17, 18:22 Completed build in 04m 03s on Tue, 10 Jan, 07:22 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6409

  24. Michael Oehlhof commented on patch set 8 01/10/17, 19:01

    locallang.xlf:382

    What about deleted warnings ? Did they also get the "error" message?
  25. Susi Moog commented on patch set 9 01/10/17, 19:03

    Published edit on patch set 8.
  1. Susi Moog voted on patch set 9 CR +1 01/10/17, 19:03

  2. TYPO3com voted on patch set 9 V +1 01/10/17, 19:07 Completed build in 04m 17s on Tue, 10 Jan, 08:07 PM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6412

  3. Susi Moog voted on patch set 9 V +1 01/11/17, 07:50

  4. Christian Kuhn commented on patch set 9 CR -1 01/11/17, 08:38

    on it.
  5. Mathias Schreiber uploaded patch set 10 01/11/17, 09:04

  6. Mathias Schreiber uploaded patch set 11 01/11/17, 09:05

  7. TYPO3com voted on patch set 10 V -1 01/11/17, 09:09 Completed build in 05m 05s on Wed, 11 Jan, 10:09 AM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6457

  8. TYPO3com voted on patch set 11 V -1 01/11/17, 09:10 Completed build in 04m 32s on Wed, 11 Jan, 10:10 AM Test Summary: 54921 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6458

  9. Mathias Schreiber uploaded patch set 12 01/11/17, 09:46

  10. TYPO3com voted on patch set 12 V +1 01/11/17, 09:51 Completed build in 04m 32s on Wed, 11 Jan, 10:51 AM Test Summary: 54945 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6464

  11. Susi Moog voted on patch set 12 CR +1 01/11/17, 10:02

  12. Christian Kuhn uploaded patch set 13 01/11/17, 10:42

  13. Christian Kuhn voted on patch set 13 CR +1 V +1 01/11/17, 10:42

  14. Daniel Windloff commented on patch set 13 01/11/17, 10:44

    ToolsController.php:39

    There should be some additional information about the $logEntry

    locallang.xlf:373

    At the moment this is only one action

    locallang.xlf:376

    same

    locallang.xlf:379

    same

    LogEntries.html:213

    I would opt for the std action icon for the delete action (recycler) with an additional description. There should be also a modal (danger) like in the recycler module to confirm the deletion as the action couldn't be reverted (without backup).
  15. TYPO3com voted on patch set 13 V +1 01/11/17, 10:47 Completed build in 04m 38s on Wed, 11 Jan, 11:47 AM Test Summary: 54945 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6469

  16. Christian Kuhn commented on patch set 12 01/11/17, 11:11

    ToolsController.php:39 Reply

    Think that's fine for now. You pushed the button and receive a message how many rows were affected. Should do, I think.

    locallang.xlf:373 Reply

    ok

    locallang.xlf:376 Reply

    no, that's actually a plural. pushing that button may delete multiple rows.

    LogEntries.html:213 Reply

    mmmh, the button text starts with "Delele" ... guess it's rather obvious what happens if you press it. This is an admin only module, I'd opt to not have a confirm on that and keep the text.
  17. Christian Kuhn uploaded patch set 14 01/11/17, 11:11

  18. Christian Kuhn commented on patch set 12 01/11/17, 11:13

    locallang.xlf:373 Reply

    ah snap. there is already an action called 'action' ... guess we should better keep 'actions' here ...
  19. Christian Kuhn uploaded patch set 15 01/11/17, 11:13

  20. Christian Kuhn voted on patch set 15 CR +1 V +1 01/11/17, 11:14

  21. TYPO3com voted on patch set 14 V +1 01/11/17, 11:16 Completed build in 04m 37s on Wed, 11 Jan, 12:16 PM Test Summary: 54945 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6471

  22. TYPO3com voted on patch set 15 V +1 01/11/17, 11:19 Completed build in 05m 34s on Wed, 11 Jan, 12:19 PM Test Summary: 54945 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6472

  23. Daniel Windloff commented on patch set 15 01/11/17, 11:43

    LogEntries.html:213 Reply

    Yes the text is obvious, but a user needs perhaps a second view. The confirmation of the deletion is also used in other admin only modules (e.g. scheduler) so I would prefer to add it.
  24. Susi Moog commented on patch set 15 CR +2 V +2 01/11/17, 11:49

    locallang.xlf:373 Reply

    this is meant to be the column for all row related actions, so the wording here is correct.

    LogEntries.html:213 Reply

    I'd also say as this is admin only, the confirmation is not necessary. As for the icons: the whole table needs a ui rework (word-wrap, column width, naming things ...). I'll take the feature as it is now as I see all that in a separate step.
  25. Gerrit merged patch set 15 01/11/17, 11:49