You don't need this macro, if you are using WinEdt 5.4, since it can already Find In Files (and more).
This macro calls WinEdt's Find Dialog and outputs all lines containing the desired string to a file %n.log, so that you can browse the lines using Search | Errors....
Put the macro in %b\Macros\text\. Assign a shortcut to it, if you want.
Macro contributed by Robert <w.m.lgmx.net>,