Use a WATCHDOG_WARNING for "FileField was trying to display the file %file, but it does not exist."

mrfelton - September 25, 2009 - 16:50
Project:FileField
Version:6.x-3.1
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

The following error message that gets sent to the watchdog:

FileField was trying to display the file %file, but it does not exist. - should use WATCHDOG_WARNING

Should really use either WATCHDOG_WARNING or WATCHDOG_ERROR. Currently it doesn't define a watchdog level, so it is defaulting to using WATCHDOG_NOTICE. When using syslog.module an application like PHPLogCon to analyse the generated Drupal watchdog log files, the above error message shows up in the log in green (green = ok)! Using a more appropriate error level would make the message flag up in orange or red, and would make identifying problems a lot easier. My patch uses the WARNING level, but I'll leave it up to you to decide if that should be an error or warning.

Patch attached :)

AttachmentSize
filefield-watchdog.patch629 bytes

#1

quicksketch - October 20, 2009 - 18:09
Title:FileField was trying to display the file %file, but it does not exist. - should use WATCHDOG_WARNING» Use a WATCHDOG_WARNING for "FileField was trying to display the file %file, but it does not exist."
Priority:normal» minor
Status:active» fixed

Committed, thanks!

#2

System Message - November 3, 2009 - 18:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.