function drush_core_watchdog_show_one

8.0.x watchdog.drush.inc drush_core_watchdog_show_one($wid)
6.x watchdog.drush.inc drush_core_watchdog_show_one($wid)
7.x watchdog.drush.inc drush_core_watchdog_show_one($wid)
3.x watchdog.drush.inc drush_core_watchdog_show_one($wid)
4.x watchdog.drush.inc drush_core_watchdog_show_one($wid)
5.x watchdog.drush.inc drush_core_watchdog_show_one($wid)
master watchdog.drush.inc drush_core_watchdog_show_one($wid)

Print a watchdog message.

Parameters

$wid: The id of the message to show.

1 call to drush_core_watchdog_show_one()
drush_core_watchdog_show in commands/core/watchdog.drush.inc
Command callback.

File

commands/core/watchdog.drush.inc, line 144

Code

function drush_core_watchdog_show_one($wid) {
  drush_set_default_outputformat('key-value-list', array('fields-default' => array('wid', 'type', 'message', 'severity', 'date'),));
  $rsc = drush_db_select('watchdog', '*', 'wid = :wid', array(':wid' => $wid), 0, 1);
  $result = drush_db_fetch_object($rsc);
  if (!$result) {
    return drush_set_error(dt('Watchdog message #!wid not found.', array('!wid' => $wid)));
  }
  $result = core_watchdog_format_result($result, TRUE);
  return array($result->wid => (array) $result);
}