-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog_stdout.module
More file actions
executable file
·25 lines (21 loc) · 1.11 KB
/
log_stdout.module
File metadata and controls
executable file
·25 lines (21 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function log_stdout_help($route_name, RouteMatchInterface $route_match)
{
$output = "";
switch ($route_name) {
case 'help.page.log_stdout':
$output = "";
$output .= '<p>' . t("Please note that this module doesn't interfere with Database Logging.") . '<br>'
. t("Once installed, no configuration is required.") . '</p>';
$output .= '<p>' . t("If your project stack includes Docker, access your server logs via the following command:") . '<br>'
. '<code>' . t("docker logs -f my_web_container") . '</code>' . '</p>';
$output .= '<p>' . t("Provoke an intended warning (by requesting a page that doesn't exist for instance) and look into the logs for a JSON formatted entry that resembles something like:") . '<br>'
. '<code>' . "{\"severity\":\"WARNING\",\"type\":\"page not found\",\"message\":\"\/non-existing-page\",\"user\":\"admin\",\"request_uri\":\"http:\/\/localhost\/non-existing-page\",\"json_format\":\"true\"}" . '</code>' . '</p>';
return $output;
}
return $output;
}