Needs work
Project:
Drupal core
Version:
main
Component:
field_ui.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2017 at 23:14 UTC
Updated:
12 Jan 2024 at 05:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jhedstromComment #3
jhedstromRemoves an unused use statement.
Comment #4
krina.addweb commented@jhedstrom,Thanks for the patch i checked it over simplytest.Me & it works well it adds the delete logs to report.
Comment #5
xjmThanks @krina.addweb for manually testing this! The screenshot is helpful.
This seems like a good idea. We should add automated tests for it as well, though.
Comment #6
jhedstromI started to look into doing this, and realized I don't think we have a generic way of testing for log messages. I was hoping the test base classes added an in-memory logger, so there would then be a simple
assertLogMessage()that could be called.We could add a one-off here for field_ui, but that seems messy (eg, enable dblog, check db for message, etc).
Thoughts?
Comment #7
jhedstromI opened #2862282: Add a test logger channel for test base classes to use.
Comment #8
jhedstromSince we currently don't have testing for the logging of messages anywhere in our test framework outside of explicit dblog module tests (see #2862282: Add a test logger channel for test base classes to use), I don't think that should hold this task up. Our existent test coverage verifies the message logged to the screen, and since tests are green here, I think we could proceed...
Comment #9
dagmarIt seems #2862282: Add a test logger channel for test base classes to use is a bit blocked. My recommendation here is to install dblog in the test and make the assertion. We are doing this in other tickets #2793637: Use human readable dates for one-link login log entries.:
Comment #14
jhedstromSince the issues to add a test logger are taking some time, and this issue really shouldn't depend on those, this adds a test for the logged message to the trait for field deletion. I added a todo for when the test logger issue is done.
Comment #16
jhedstromRe-roll of #14.
Comment #17
mayurgajar commentedComment #18
mayurgajar commentedHi @ jhedstrom,
patch #16 apply cleanly LGTM +1 RTBC .
Thanks..!!!
Comment #19
mayurgajar commentedComment #20
mayurgajar commentedComment #21
alexpottAs a form I'd use
$this->logger('logger.channel.field_ui'). That way we don't need to wonder about deprecating calling the constructor with the logger channel. Way less change.Comment #22
hardik_patel_12 commentedKindly review a patch , removing logger service injection and using $this->logger('logger.channel.field_ui') to log messsages.
Comment #23
hardik_patel_12 commentedComment #25
Lal_@hardik wrong name for the `type`
Comment #26
Lal_forgot the interdiff
Comment #29
vikashsoni commentedApply #2 patch working fine add deleted fields in logger
sharing screenshot....
Comment #34
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.