API page: http://api.drupal.org/api/drupal/includes--errors.inc/function/_drupal_l...

Describe the problem you have found:
The documentation is incomplete suggested improvement:
$error An array with the following keys: %type, !message, %function, %file, %line and severity. All the parameters are plain-text, exception message, which needs to be a safe HTML string.

Comments

ChrisFlink’s picture

wrong closing tag:
$error An array with the following keys: %type, !message, %function, %file, %line and severity. All the parameters are plain-text, exception message, which needs to be a safe HTML string.

jhodgdon’s picture

Title: Documentation problem with _drupal_log_error » _drupal_log_error - $error doc is incomplete
Version: 7.x-dev » 8.x-dev
Issue tags: +Novice, +Needs backport to D7

That is close -- it looks like it's actually using
$error['severity_level']

Agreed this should be added to the doc. Also, while we're at it, the grammar of the 2nd sentence there could be fixed: "All the parameters are plain-text, exception message, ..." => "All the array elements are plain-text, with the exception of !message, ...".

Needs to be fixed in D8 first, then ported to D7, and good project for a novice doc contributor...

ChrisFlink’s picture

Correct, it should be 'severity_level'. I was a bit hurried while adding this issue...

barbi’s picture

Assigned: Unassigned » barbi
Status: Active » Needs review
StatusFileSize
new757 bytes
ChrisFlink’s picture

Review looks good to me!

jhodgdon’s picture

Status: Needs review » Needs work

Looks good, except that there is an extra space at the end of one of the lines.

You might want to check your text editor settings and see if you can turn on highlighting of end-of-line spaces.

barbi’s picture

Status: Needs work » Needs review
StatusFileSize
new756 bytes

Removed the additional space at the end of the line.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, go barbi! :)

Ready for d7/8.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x.

It feels like rename 'severity_level' to 'severity' might made the API a tiny bit cleaner and more consistent. Not part of this issue though.

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