Closed (fixed)
Project:
GELF
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2011 at 20:20 UTC
Updated:
2 Dec 2011 at 18:33 UTC
Jump to comment: Most recent file
An exception is thrown (and potentially caught by the try/catch block included in a previous patch) when wessage is too short for wordwrap to add the necessary newline character.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | gelf_short_message2.patch | 898 bytes | jeffsheltren |
| #2 | gelf_short_message.patch | 726 bytes | jeffsheltren |
| #1 | fix_short_short_message-1250206-1-D6.patch | 672 bytes | pdrake |
Comments
Comment #1
pdrake commentedSee attached for a method to prevent this by appending a newline character to the return of wordwrap.
Comment #2
jeffsheltren commentedI also experienced this problem with the latest version of the module -- short_message isn't getting set for messages less than 100 characters in length. Here's an alternate patch which gets rid of wordwrap completely. This patch is sponsored by WebWise Solutions and Symantec.
Comment #3
msonnabaum commented#2 looks good to me.
Committed.
Comment #4
jeffsheltren commentedI noticed that when the original message is shorter than 100 characters that my patch was chopping off the last word of it to create the short message. Here's an updated patch which only does the preg_replace if the substr function is called and will directly assign the short message if the message is shorter than 100 characters.
Comment #5
jeffsheltren commentedCommitted the updated patch from #4.