You are here

function dblog_help in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/dblog/dblog.module \dblog_help()
  2. 6 modules/dblog/dblog.module \dblog_help()
  3. 7 modules/dblog/dblog.module \dblog_help()
  4. 9 core/modules/dblog/dblog.module \dblog_help()

Implements hook_help().

File

core/modules/dblog/dblog.module, line 21
System monitoring and logging for administrators.

Code

function dblog_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.dblog':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Database Logging module logs system events in the Drupal database. For more information, see the <a href=":dblog">online documentation for the Database Logging module</a>.', [
        ':dblog' => 'https://www.drupal.org/documentation/modules/dblog',
      ]) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Monitoring your site') . '</dt>';
      $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' => Url::fromRoute('dblog.overview')
          ->toString(),
      ]) . '</dd>';
      $output .= '<dt>' . t('Debugging site problems') . '</dt>';
      $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' => Url::fromRoute('dblog.overview')
          ->toString(),
      ]) . '</dd>';
      $output .= '<dt>' . t('This log is not persistent') . '</dt>';
      $output .= '<dd>' . t('The Database Logging module logs may be cleared by administrators and automated cron tasks, 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>';
      $output .= '</dl>';
      return $output;
    case 'dblog.overview':
      return '<p>' . t('The Database Logging module logs system events in the Drupal database. Monitor your site or debug site problems on this page.') . '</p>';
  }
}