Problem/Motivation

Based on #1635646: Admin users should know site report permission allows for more than viewing it is clear that the dblog module cannot be used as a forensic log.

Here is a screen shot of the current help screen at /admin/help/dblog
dblog help screen

Proposed resolution

Add to the dblog_help hook the reasons why dblog cannot be used for forensic log. These reasons are:

  • The user with administer site reports can delete them.
  • Cron automatically removes older logs.

Also recommend alternatives like syslog.

Remaining tasks

Write a patch. Review the wording.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#103 2732113-99.gif70.35 KBkleiton_rodrigues
#99 2732113-99.patch1.64 KBKapilV
#97 dbloghelp2.png152.86 KBselwynpolit
#95 dbloghelp1.png134.61 KBselwynpolit
#91 2732113-91.patch2.22 KBranjith_kumar_k_u
#78 dblog_help-2732113-78.patch2.2 KBDinesh18
#73 2732113-73.patch1.5 KBdhruveshdtripathi
#72 interdiff-2732113-70-72.txt1.9 KBdhruveshdtripathi
#72 2732113-72.patch1.5 KBdhruveshdtripathi
#70 2732113-70.patch1.52 KBrakesh.gectcr
#70 interdiff-2732113-64-70.txt1.31 KBrakesh.gectcr
#65 Screenshot 2017-04-28 13.02.08.png112.23 KBmikeohara
#64 2732113-64.patch1.51 KBtameeshb
#64 interdiff.txt1.31 KBtameeshb
#61 interdiff_2732113_59-61.txt1.41 KBJacobSanford
#61 2732113-61.patch1.51 KBJacobSanford
#59 interdiff_2732113_56-59.txt2.99 KBJacobSanford
#59 2732113-59.patch1.51 KBJacobSanford
#56 interdiff-54-56.txt1.85 KBtameeshb
#56 2732113-56.patch2.66 KBtameeshb
#55 Selection_356.png19.13 KBdagmar
#54 interdiff-53-54.txt2.54 KBtameeshb
#54 2732113-54.patch2.66 KBtameeshb
#52 interdiff-47-52.txt1.85 KBgaurav.kapoor
#52 2732113-52.patch1.78 KBgaurav.kapoor
#47 2732113-47.patch1.78 KBtameeshb
#45 interdiff-41-45.txt1.73 KBtameeshb
#45 2732113-45.patch1.79 KBtameeshb
#41 2732113-41.patch1.67 KBtameeshb
#41 interdiff-36-41.txt1.59 KBtameeshb
#38 Screen Shot 2017-01-29 at 9.59.41 PM.png370.37 KBleslieg
#36 2732113-36.patch1.66 KBronchica
#36 interdiff-2732113-35-36.txt1.68 KBronchica
#35 2732113-35.patch1.66 KBronchica
#35 interdiff-2732113-28-35.txt1.84 KBronchica
#28 2732113-28.patch1.81 KBronchica
#28 interdiff-2732113-22-28.txt1.99 KBronchica
#25 Screen Shot 2017-01-29 at 11.41.53 AM.png164.87 KBronchica
#25 Screen Shot 2017-01-29 at 12.05.57 PM.png134.69 KBronchica
#22 interdiff-2732113-16-22.txt1.45 KBrakesh.gectcr
#22 2732113-22.patch1.81 KBrakesh.gectcr
#19 2732113-18.patch1.8 KBarkiii
#16 2732113-16.patch1.8 KBdagmar
#13 2732113-13.patch1.79 KBdagmar
#11 2732113-11.patch1.7 KBrajeshwari10
#9 2732113-9.patch1.66 KBrajeshwari10
#7 2732113-7.patch4.36 KBrajeshwari10
#5 2732113-5.patch1.59 KBrajeshwari10
#3 2732113-3.patch1.45 KBrajeshwari10

Issue fork drupal-2732113

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dagmar created an issue. See original summary.

rajeshwari10’s picture

Assigned: Unassigned » rajeshwari10
rajeshwari10’s picture

Status: Active » Needs review
FileSize
1.45 KB

Applying patch

Thanks!!

dagmar’s picture

Status: Needs review » Needs work

Thanks! However it feels a bit out of context copy & paste a comment from a thread into the hook_help. Try to change the second line of your patch to something that explain why the dblog is not a good solution.

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
1.59 KB

Hi dagmar,

I have explained why the db_log should not be used.

Please review.

Thanks!!

dagmar’s picture

Status: Needs review » Needs work

Better :)

  1. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,8 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dt>' . t('Use of Syslog so that dblog module should not be used for forensic log') . '</dt>';
    

    Syslog is not the only alternative to keep persistent logs. There are other logging mechanisms like monolog. So recommend syslog as the final solution may not be accurate.

  2. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,8 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dd>' . t('Database Logging will not allow you to see logs if your site is not accessible. Also, Database logging module writes logs to the database which can slow down the website. By using Syslog you can improve the performance of the site. Syslog helps you to see the logs and troubleshoot even if site is not accessible') . '</dd>';
    

    I think we should provide a positive feedback here, it seems dblog is not useful at all. Maybe a bullet list that says something like:

    The dblog module may not work on the following scenarios ...

    -
    -
    -

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
4.36 KB

Done changes as per said.

Thanks!!

Status: Needs review » Needs work

The last submitted patch, 7: 2732113-7.patch, failed testing.

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
1.66 KB

Adding Patch

Thanks!!

dagmar’s picture

Status: Needs review » Needs work

Thanks! Although there are some new issues with this patch.

  1. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,12 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dt>' . t('Dblog module should not be used for forensic log as they may not work on the following scenarios -') . '</dt>';;
    

    double ;;

  2. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,12 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dd>' ;
    

    extra space there before the semicolon.

  3. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,12 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dt>' . t('Using syslog or similar logging mechanisms may help to overcome the above said scenarios.') . '</dt>';
    

    I think we should mention also that cron clears automatically old logs.

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
1.7 KB

I have done the changes.

Thanks!!

dagmar’s picture

Issue summary: View changes
dagmar’s picture

Component: dblog.module » documentation
FileSize
1.79 KB

Moving temporarily to documentation to get feedback about this from @jhodgdon

jhodgdon’s picture

Status: Needs review » Needs work

Adding this information seems like a good idea.

A few things to fix in this documentation:

a) You've introduced the term "forensic log" without explaining what that means. I can guess, but I had never heard this term before. And I'm a fairly experienced Drupal user. This documentation is in hook_help(), which is meant for novices, so terms really need to be explained.

b) The HTML needs some attention. You can't drop an H3 into the middle of a DL list. It needs to be a DT. And the LI list items are not good, as they aren't part of a UL list.

c) The heading also needs attention. You're in the middle of the "Uses" section, and our standard is that the headers in the Uses section need to start with -ing verbs.

d) When referring to a module, use a format like "the Foo Bar module", where "Foo Bar" is the name of the module that appears in the .info.yml file. So don't say "the syslog module".

e) There are a lot of grammatical problems, but let's get the text right before addressing those.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dagmar’s picture

Status: Needs work » Needs review
Issue tags: +String change in 8.3.0
FileSize
1.8 KB

Thanks. I took another approach this time.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

arkiii’s picture

arkiii’s picture

I did some re-wording to correct the output. I think it reads better.

dagmar’s picture

Status: Needs review » Needs work
Issue tags: +SprintWeekend2017, +BuenosAiresSprint

Thanks, I think you probably modified by hand the patch and now it didn't apply.

git apply 2732113-18.patch 
fatal: corrupt patch at line 13

Please follow this instructions https://www.drupal.org/patch

dagmar’s picture

Issue tags: -String change in 8.3.0 +String change in 8.4.0, +Novice
rakesh.gectcr’s picture

Assigned: rajeshwari10 » Unassigned
Status: Needs work » Needs review
FileSize
1.81 KB
1.45 KB

The last submitted patch, 19: 2732113-18.patch, failed testing.

ronchica’s picture

I am going to look at this as part of SprintWeekend2017

ronchica’s picture

I checked /admin/help/dblog in 8.4.0-dev before and after applying the patch. Looks good.

Before:

After:

ronchica’s picture

Status: Needs review » Reviewed & tested by the community
cilefen’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,9 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('Users with <em>administer site reports</em> permissions can clear all the logs, and the cron can <a href =":logging_settings" title="Go to logging settings page.">regularly clear</a> old entries, this module should not be used to keep logs for forensic purposes.', [':logging_settings' => \Drupal::url('system.logging_settings')]) . '</p>';
    

    It is "cron", not "the cron".

  2. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,9 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('Forensic logs are intended to persist over time to allow researchers to detect problems after they have occured. This type of log cannot be deleted or altered. The Syslog module is recomended for this scenario.') . '</p>';
    

    "This type of log" is confusing here. I would rather it read "Forensic logs cannot be..." and "If forensic logging is needed, the Syslog module is recommended."

ronchica’s picture

Status: Needs work » Needs review
FileSize
1.99 KB
1.81 KB

Updated text, uploaded patch, and interdiff for the first time :)

Status: Needs review » Needs work

The last submitted patch, 28: 2732113-28.patch, failed testing.

ronchica’s picture

Status: Needs work » Needs review

needed to re-run test

dagmar’s picture

Status: Needs review » Reviewed & tested by the community

Thanks everyone.

cilefen’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,9 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('Users with <em>administer site reports</em> permissions can clear all the logs, and cron can <a href =":logging_settings" title="Go to logging settings page.">regularly clear</a> old entries, this module should not be used to keep logs for forensic purposes.', [':logging_settings' => \Drupal::url('system.logging_settings')]) . '</p>';
    

    This is a run-on sentence.

  2. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,9 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('Forensic logs are intended to persist over time to allow researchers to detect problems after they have occured. Forensic logs cannot be deleted or altered. If forensic logging is needed, the Syslog module is recommended.') . '</p>';
    

    Sorry, I should have reviewed this a little deeper. Only "researchers" can detect problems in forensic logs? What about site admins, developers, or sysadmins?

    Forensic logs cannot be deleted or altered. If forensic logging is needed, the Syslog module is recommended.

    If you use the Syslog module, that does not mean logs at the destination cannot be deleted or altered. The entire second sentence is problematic and maybe misleading. I would cut the sentence, and add to the first sentence something like "It is recommended to use the Syslog module to build a forensic logging system".

ronchica’s picture

The run-on sentence can be fixed by changing "This module should not be used to keep logs for forensic purposes." to its own sentence.

I think "researchers" is a term being used to describe people that need to solve a problem, and those could be any type of person. How about:

Users with administer site reports permissions can clear all the logs, and cron can regularly clear old entries. This module should not be used to keep logs for forensic purposes.

Forensic logs are intended to persist over time to detect and research problems after they have occurred. It is recommended to use the Syslog module to build a forensic logging system.

Note: occurred was spelled incorrectly.

Let me know any changes (or not) and I will re-do the patch.

cilefen’s picture

I think: "Because users with the administer site reports permission can clear all the logs, and because cron can regularly clear old entries, this module should not be used to keep logs for forensic purposes. Instead, it is recommended to use the Syslog module to build a forensic logging system."

ronchica’s picture

Status: Needs work » Needs review
FileSize
1.84 KB
1.66 KB

Ok. That's better.

ronchica’s picture

Forgot the period at the end of the sentence. Re-did the patch.

ronchica’s picture

Issue tags: +SprintWeekendBOS
leslieg’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
370.37 KB

Review of latest patch shows the requested changes to the forensic section of the help text.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Great work refining this help text!

There's one more change I would make. Starting sentences with "Because..." and following with many commas increases the burden on the user, because they have to remember more things to read the sentence. How about starting with "Users with..., and cron..." Then in a separate sentence, something like:

For these reasons, the Database Logging module should not be used for forensic purposes. (The Syslog module can be used forensically instead.)

Also, it might be good to either find a reliable resource on what forensic logging is, and link it, or to include a brief clarification in a few words on what that means.

tameeshb’s picture

Assigned: Unassigned » tameeshb

Something like this?

Users with administer site reports permissions can clear all the logs, and cron can regularly clear old entries.
For these reasons, the Database Logging module should not be used for forensic purposes. Instead, it is recommended to use the Syslog module to build a forensic logging system.

tameeshb’s picture

Status: Needs work » Needs review
FileSize
1.59 KB
1.67 KB
dagmar’s picture

Status: Needs review » Needs work

Thanks @tameeshb. Stills needs to fix this:

Also, it might be good to either find a reliable resource on what forensic logging is, and link it, or to include a brief clarification in a few words on what that means.

tameeshb’s picture

Any recommendations for a reliable resource for the text/link?

dagmar’s picture

tameeshb’s picture

Status: Needs work » Needs review
FileSize
1.79 KB
1.73 KB

Added the wikipedia reference with interdiff. Please review! :)

dagmar’s picture

Status: Needs review » Needs work

Thanks. This needs to be converted to the new arrays syntax []. The patch doesn't apply anymore.

tameeshb’s picture

Status: Needs work » Needs review
FileSize
1.78 KB

Converted to new array syntax.

cilefen’s picture

"see here" is not good anchor text.

tameeshb’s picture

dagmar’s picture

Maybe "Read more about forensic logging."

Also, please remove the <br>

dagmar’s picture

Status: Needs review » Needs work
gaurav.kapoor’s picture

Status: Needs work » Needs review
FileSize
1.78 KB
1.85 KB
abi_cima’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,8 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
           $output .= '<dd>' . t('The Database Logging module allows you to view an event log on the <a href=":dblog">Recent log messages</a> page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', [':dblog' => \Drupal::url('dblog.overview')]) . '</dd>';
    

    You could say "...containing errors, warnings, operational information, as well as usage and performance data". This is to avoid repeating and too many times in the same sentence.

  2. +++ b/core/modules/dblog/dblog.module
    @@ -28,6 +28,8 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
           $output .= '<dd>' . t('In case of errors or problems with the site, the <a href=":dblog">Recent log messages</a> page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', [':dblog' => \Drupal::url('dblog.overview')]) . '</dd>';
    

    There is no "," before and. It should be "...usage information, warnings and errors"

tameeshb’s picture

Status: Needs work » Needs review
FileSize
2.66 KB
2.54 KB

Changed from #53

dagmar’s picture

Status: Needs review » Needs work
FileSize
19.13 KB

We need an extra space here:

tameeshb’s picture

Status: Needs work » Needs review
FileSize
2.66 KB
1.85 KB

Added space before "Read more"

dagmar’s picture

Status: Needs review » Reviewed & tested by the community

Thanks everyone.

xjm’s picture

Status: Reviewed & tested by the community » Needs work
  1. The scope of this patch seems to be expanding. We need to be careful about adding one piece of documentation to changing all the documentation, because it means patches never get done.
  2. +++ b/core/modules/dblog/dblog.module
    @@ -25,9 +25,11 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dd>' . t('The Database Logging module allows you to view an event log on the <a href=":dblog">Recent log messages</a> page. The log is a chronological list of recorded events containing errors, warnings, operational information, as well as usage and performance data. Administrators should check the log on a regular basis to ensure their site is working properly.', [':dblog' => \Drupal::url('dblog.overview')]) . '</dd>';
    

    There's an "and" missing before "operational information". However, this change is out of scope. The scope of this issue is to add one point of documentation, not improve the existing documentation. We should file a separate followup for @abi_cima's suggested improvements.

  3. +++ b/core/modules/dblog/dblog.module
    @@ -25,9 +25,11 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('Users with <em>administer site reports</em> permissions can clear all the logs, and cron can <a href =":logging_settings" title="Go to logging settings page.">regularly clear</a> old entries. For these reasons, the Database Logging module should not be used for forensic purposes. Instead, it is recommended to use the Syslog module to build a forensic logging system. <a href=":audit_trail_wiki">Read more </a> about forensic logging.', [':logging_settings' => \Drupal::url('system.logging_settings'), ':audit_trail_wiki' => 'https://en.wikipedia.org/wiki/Audit_trail']) . '</p>';
    

    I still think there are several problems with this paragraph.

    • "Regularly clear" and "Read more" are also not good link texts. Link texts should make sense and be specific out of context. Adding titles to the links does not really make up for just selecting better text, e.g. <a href="">Read more about forensic logging</a>.
    • I don't think we need to provide so much detail on what can change the logs. I'd simply say "Administrators and automated cron tasks can clear the database logs."
    • The sentence "It is recommended to use the Syslog module to build a forensic log" is also misleading. It sounds like we're telling the user they need to go and make a forensic log. That's not the goal. The goal is only to provide people who already want a forensic log information that this is the wrong tool.
    • We also don't need to distract them so much about forensic logging.

Putting it together:

Administrators and automated cron tasks can clear the Database Logging module's logs, so they should not be used for <a href="https://en.wikipedia.org/wiki/Audit_trail">forensic logging</a>. For forensic purposes, use the Syslog module instead.

Much shorter. Less to read. Fewer misdirections.

The other two changes should be removed from the patch. @abi_cima, maybe you could file the new issue for them since they were your suggested improvements?

Thanks everyone!

JacobSanford’s picture

Status: Needs work » Needs review
FileSize
1.51 KB
2.99 KB

Thanks for review!

Enclosed is a patch reducing the scope and changing the wording as outlined in #58.

@abi_cima I have not filed the new issues as suggested.

Regards

valthebald’s picture

Status: Needs review » Needs work
Issue tags: +DCTransylvania

@JacobSanford please note, that per https://www.drupal.org/docs/develop/standards/coding-standards#quotes,
single quote escaping should be avoided when possible.

JacobSanford’s picture

Status: Needs work » Needs review
FileSize
1.51 KB
1.41 KB

@valthebald Thanks for quick review!

My bad - reversed the quotes in that line.

xjm’s picture

Assigned: tameeshb » Unassigned
Status: Needs review » Needs work

Hmmmm I don't think we use single quotes around HTML attributes, like, anywhere. (Well, there are three total instances in core with an href attribute.) OTOH there are plenty of examples of escaping an apostrophe in a string.

So let's go back to the previous patch. Sorry for the confusion! We need to reupload it as the final file attachment to the issue.

xjm’s picture

Actually, we can also just remove the 's entirely: "can clear the Database Logging module logs". :)

tameeshb’s picture

Status: Needs work » Needs review
FileSize
1.31 KB
1.51 KB

Added change from #63 on patch from #59

mikeohara’s picture

Issue tags: +Baltimore2017
FileSize
112.23 KB

Picking this up to quickly test during Baltimore 2017 - I think this can RTBC'd looks good and concise.

mikeohara’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 64: 2732113-64.patch, failed testing.

c.nish2k3’s picture

Status: Needs work » Reviewed & tested by the community

Patch applies and looks good.
+1 RTBC

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 64: 2732113-64.patch, failed testing.

rakesh.gectcr’s picture

Status: Needs work » Needs review
FileSize
1.31 KB
1.52 KB

Just been curious why the test is getting failed.

valthebald’s picture

Status: Needs review » Needs work

1. Markup should be consistent with other message, i.e. '<h3>' should be '<dt>', '<p>' => '<dd>'
2. Second message doesn't contain apostrophe, so single quotes should be used.
3. word "instead" is unnecessary in the end, can be just "For forensic purposes, use the Syslog module."

As non-native English speaker, I am not sure in the last item, safe to ignore if you disagree.

dhruveshdtripathi’s picture

Status: Needs work » Needs review
FileSize
1.5 KB
1.9 KB

Made changes according to comment #71.1 and #71.3. Not sure about #71.2. Because earlier, using single quotes was the reason for tests getting failed.

Correct me if I'm wrong.

Thank you.

dhruveshdtripathi’s picture

I thinks #71.2 should be followed. Let's give it a try.

valthebald’s picture

Status: Needs review » Reviewed & tested by the community

Thank you @dhruveshdtripathi! Additions look good, and consistent with previous output of

dblog_help()

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 73: 2732113-73.patch, failed testing.

dhruveshdtripathi’s picture

Status: Needs work » Reviewed & tested by the community

Retested patch #73

catch’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/dblog/dblog.module
@@ -29,6 +29,8 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<dd>' . t('Administrators and automated cron tasks can clear the Database Logging module logs, so they should not be used for <a href=":audit_trail_wiki">forensic logging</a>. For forensic purposes, use the Syslog module.', [':audit_trail_wiki' => 'https://en.wikipedia.org/wiki/Audit_trail']) . '</dd>';

This is very picky, but the 'they' feels ambivalent here between'Database Logging module logs' and 'Administrators and automated cron tasks'.

I wonder if just removing the 'so' would help with that. Or reversing so "The Database Logging module logs may be cleared by administrators and automated cron tasks, so they should [...]'.

Dinesh18’s picture

I have implemented the changes mentioned in #77.

vaibhav29’s picture

#78 looks good to me.
+1 to RTBC.

yoroy’s picture

What about:

These logs are not useful for forensic logging because they can be cleared by administrators and cron tasks. For forensic purposes, use the Syslog module.

valthebald’s picture

@yoroy I'd still vote for #78 because it's more neutral (i.e. does not contain evaluation "not useful")

apaderno’s picture

These logs cannot be used for forensic logging because they could be cleared by administrators and cron tasks. For forensic purposes, use the Syslog module.

There isn't any evaluation, and I think it's slightly better.

apaderno’s picture

The text first says This log is not persistent, and then The Database Logging module logs. The use of singular/plural should be consistent.

This log cannot be used for forensic logging because it could be cleared by administrators and cron tasks. For forensic purposes, use the Syslog module.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

ranjith_kumar_k_u’s picture

Issue tags: -
FileSize
2.22 KB

Re-rolled for 9.2

selwynpolit’s picture

I'm going to work on this issue during Drupalcon NA 2021 for the next hour or two

ijf8090’s picture

Assigned: Unassigned » ijf8090
Issue tags: +NorthAmerica2021

Novice contributor, DrupalCon2021. I'm working on this as part of mentoring for 90 minutes...

Per "The text first says This log is not persistent, and then The Database Logging module logs. The use of singular/plural should be consistent.

This log cannot be used for forensic logging because it could be cleared by administrators and cron tasks. For forensic purposes, use the Syslog module.
"

ChrisDarke’s picture

Helping out with mentoring on this issue with selwynpolit and ijf8090

selwynpolit’s picture

Issue summary: View changes
FileSize
134.61 KB

selwynpolit’s picture

FileSize
152.86 KB

Forked issue, created merge request #MR !549
Updated the text to more clearly reflect what the Irish would say. Note. They have more nobel prize winners for the english language per capita than anyone else. The text was provided by the amazing Ian Finlay

and thanks to Aimee Hannaford for the cheerleading and James Gilliland for the Gitlab wisdom. I'd like to thank the academy *sniff*

See new screenshot below:

The newly fixed dblog help screen

apaderno’s picture

Assigned: ijf8090 » Unassigned
Status: Needs review » Needs work
+      $output .= '<dt>' . t('This log is not persistent') . '</dt>';
+      $output .= '<dd>' . t('Database Logging will not allow you to see logs if your site is not accessible. Also, the Database logging module writes logs to the database which can slow down the website. By using Syslog you can improve the performance of the site. Syslog, helps you to see the logs and troubleshoot even if site is not accessible', [':audit_trail_wiki' => 'https://en.wikipedia.org/wiki/Audit_trail']) . '</dd>';

There should not be any comma between the subject (Syslog) and the verb (helps).
The module name is Database Logging, but the description once uses that correctly, and once uses Database logging.

I think the following text is preferable, as it avoids repeating the same words.

The Database Logging module writes logs to the database, which can slow down the website. It won't allow you to see logs if your site isn't accessible. By using the Syslog module, you can improve the performance of the site. The module helps you to see the logs and troubleshoot even if your site is not accessible.

I am not sure the system log is always accessible when the website isn't accessible; it seems to exclude the website isn't accessible because the server isn't accessible. Given the description is read from users who access a remote server (in most of the cases), those sentences seem misleading.

KapilV’s picture

Status: Needs work » Needs review
FileSize
1.64 KB

Addressed #98.

apaderno’s picture

I still think that the sentence used in the previous patches is preferable.

The Database Logging module logs may be cleared by administrators and automated cron tasks, so they should not be used for forensic logging. For forensic purposes, use the Syslog module.

The part about performance is irrelevant. The point is that the database table used from the Database Logging module can be cleared at any time, from cron tasks or from administrator users; for that reason, it cannot used for forensic logging.
The part about the system log being always available is probably not relevant for the forensic purposes, and it isn't completely true; on a remote server, both the system log and the site could be inaccessible at the same time.

selwynpolit’s picture

I am going to update my merge request to reflect the new text requested.

apaderno’s picture

Status: Needs review » Reviewed & tested by the community

The merge request changes the code as suggested.

kleiton_rodrigues’s picture

FileSize
70.35 KB

#99 looks good to me.
+1 to RTBC.

longwave’s picture

RTBC+1, the new text is succinct and explains the issue at hand.

Hiding all patches as this issue is using the merge workflow.

larowlan’s picture

Saving issue credits.

Will leave this for @catch or @xjm to have the final say as they've reviewed it a few times.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Looked back over mine and @xjm's comments (from 2017 (!)) and the latest version addresses both.

Committed 383360e and pushed to 9.2.x. Thanks!

  • catch committed 383360e on 9.2.x
    Issue #2732113 by tameeshb, selwynpolit, rajeshwari10, ronchica,...

Status: Fixed » Closed (fixed)

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