In messages where a big string may be inserted, prefer “something something %s” over “something %s something”.
Example:
In this example, %s is a long hex-string representing an array’s contents.
Bad:
[DECODE] [DEBUG] Was passed array ‘%s’ for processing
Good:
[DECODE] [DEBUG] Was passed array for processing: ‘%s’
Best:
[DECODE] [DEBUG] Function myDecodeFunc called with myArray = ‘%s’
June 2, 2007 at 6:25 am
But why?!
June 2, 2007 at 3:47 pm
It makes copying and pasting, or log processing, easier and more intuitive. Logs aren’t where you want to have a grammatically nice UI – you just want better logging.