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 119

Code

function drush_core_watchdog_show_one($wid) {
  $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);
  foreach ($result as $key => $value) {
    $uc = ucfirst($key);
    $upper->$uc = $value;
  }
  drush_print_table(drush_key_value_to_array_table($upper));
  print "\n";
}