The documentation for following constants is missing:
WATCHDOG_EMERG
WATCHDOG_ALERT
WATCHDOG_CRITICAL
WATCHDOG_ERROR
WATCHDOG_WARNING
WATCHDOG_NOTICE
WATCHDOG_INFO
WATCHDOG_DEBUG

Comments

confiz’s picture

StatusFileSize
new2.35 KB

The documentation is completed for Drupal 6

confiz’s picture

Status: Active » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

It looks like these are already documented in Drupal 7.

Your patch for Drupal 6 is OK, except the part at the top:

 /**
+ * Log message severity -- Emergency: system is unusable.
  *
- * Severity levels, as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html
  * @see watchdog()
  * @see watchdog_severity_levels()
  */

I think this should be removed, because this doc header isn't attached to any file or function or constant.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

Actually, I misread this -- it is on EMERG. Duh.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

No mention of the RFC anymore?

jhodgdon’s picture

Title: Missing documentation problem with WATCHDOG_ERROR, WATCHDOG_ALERT, WATCHDOG_CRITICAL and other constants » WATCHDOG_ERROR, WATCHDOG_ALERT, WATCHDOG_CRITICAL and other constants not documented properly
Version: 6.x-dev » 7.x-dev
Status: Needs work » Active
Issue tags: +Novice

Agreed, we should have the reference to the RFC in there. This is also missing in Drupal 7.

So for Drupal 7, the issue is that all of these WATCHDOG_* need to have a reference put in to the RFC (see the patch above - the line that was removed).

Then for Drupal 6 we need a patch that is just like the above but leaving in or adding the reference to the RFC.

Should be a good project for a novice doc contributor.

qasimzee’s picture

subscribe

qasimzee’s picture

Status: Active » Needs review
StatusFileSize
new2.02 KB

The updated patch is attached.

Status: Needs review » Needs work

The last submitted patch, 696696_1.patch, failed testing.

qasimzee’s picture

StatusFileSize
new2.01 KB

updated patch is attached

jhodgdon’s picture

Status: Needs work » Needs review

You have to set the status back to "needs review" to launch the test bot. :)

jhodgdon’s picture

Status: Needs review » Needs work

The patch isn't correct though. We are looking for a Drupal 7 patch that puts back in the line that said

Severity levels, as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html

Garrett Albright’s picture

Title: WATCHDOG_ERROR, WATCHDOG_ALERT, WATCHDOG_CRITICAL and other constants not documented properly » WATCHDOG_* constants not documented properly
Status: Needs work » Needs review
StatusFileSize
new647 bytes

It looks like each declaration is now commented properly, but the bit about the RFC is still missing.

jhodgdon’s picture

Status: Needs review » Needs work

I don't think this patch really fixes the D7 issue. All of the individual WATCHDOG_* constants need a reference to the RFC.

Garrett Albright’s picture

Status: Needs work » Needs review
StatusFileSize
new2.72 KB

Each individual one?

Garrett Albright’s picture

StatusFileSize
new2.7 KB

Grammar fix.

jhodgdon’s picture

Status: Needs review » Needs work

Hmmm...

So think about where this will be displayed, a page like:
http://api.drupal.org/api/constant/WATCHDOG_ERROR/7

I don't think saying "These constant definitions..." makes sense in that context, because you are just documenting a single constant.

Come to think of it, the summary line is also not very good:

Log message severity -- Error: error conditions.

I don't think it should be plural, and it seems very awkward to me. Maybe we should make all of these something like this:

Watchdog log message severity constant indicating an error condition.

Thoughts?

Garrett Albright’s picture

StatusFileSize
new2.77 KB

Pick those nits, dawg.

The text describing the severities are just copy-and-pasted from the RFC. I think they're fine, and (as seen in #15 and #16) I tend to be picky about such things.

Garrett Albright’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Issue tags: -Novice

The last submitted patch, 696696-watchdog-constants-4-D7.patch, failed testing.

qasimzee’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Issue tags: +Novice

The last submitted patch, 696696-watchdog-constants-4-D7.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

I'm happy with the patch in #18. Thanks!

I think the test bot is broken. This is a doc-only patch and obviously didn't affect the database being dropped (whatever that means).

jhodgdon’s picture

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

jhodgdon’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)

Needs port to Drupal 6. It won't be the patch above exactly, but the resulting sections of doc should be the same.

Garrett Albright’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new3.62 KB

D6 patch.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, thanks again!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

asimmonds’s picture

Priority: Normal » Critical
Status: Fixed » Needs review
StatusFileSize
new590 bytes

The D6 commit accidentally renamed the constant WATCHDOG_EMERG to WATCHDOG_EMERGENCY.

Follow-up patch to revert this.

Garrett Albright’s picture

Oops. Sorry about that.

gábor hojtsy’s picture

Status: Needs review » Fixed

Committed, thank you.

Status: Fixed » Closed (fixed)
Issue tags: -Novice

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