I think you are referring to the page about trace hook macros on the web site? Three of the five FreeRTOS tutorial books have already been updated to include a section on using the trace macros, with quite a comprehensive example included too (another book has also been updated, but the example not yet ported).
“how does the "reasonBLOCKING_ON_QUEUE_READ" defined”
reasonBLOCKING_ON_QUEUE_READ is supposed to be just a unique constant that indicates that the context switch that is about to occur is occurring because the current task blocked on a queue read. In a real application, it would just be a number, nothing else. It is a hypothetical example so the definition of reasonBLOCKING_ON_QUEUE_READ is not given.
“And how does the "log_event()" function logging the task execution?”
Again, its a hypothetical example, so log_event() is not doing anything. It is up to the application to decide how you want to log an event. It could be write to a RAM disk for example, but ideally it would be to communicate with a kernel aware debugger. The Cortex-M3 can output trace information in real time in a non intrusive manner, so if that was how the trace was output, log_event() would simply be a macro that wrote to the trace port.
Regards.