This should do it:
#define DEB_LOG(__FORMAT__,...) NSLog((@"%s line %d%s $ " __FORMAT__), \
__PRETTY_FUNCTION__, __LINE__, \
([NSThread isMainThread] ? " (main thread)" : ""), \
##__VA_ARGS__)
The output generated from
DEB_LOG(@"%@", @"Hello world");
is
-[AppDelegate application:didFinishLaunchingWithOptions:] line 20 (main thread) $ Hello world