# Can subrequest be used in log phase

**URL:** <https://www.ruby-forum.com/t/can-subrequest-be-used-in-log-phase/214454>\
**Category:** NGINX\
**Created:** [December 2, 2011, 9:06am UTC](https://www.ruby-forum.com/t/can-subrequest-be-used-in-log-phase/214454 "2011-12-02T09:06:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [December 2, 2011, 9:06am UTC](https://www.ruby-forum.com/t/can-subrequest-be-used-in-log-phase/214454/1 "2011-12-02T09:06:28Z")

</div>

Hi,

I want to know whether subrequest can be used in log phase.

I want to store some info in redis only for the requests with  
response code of 200.  
I’m planning to develop a c module which work in log phase .

Thanks in advance.

BR,  
DeltaY

---

<div class="post-metadata">

**Author:** ![Delta\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f9ae1b/32.png) [@Delta\_Y](https://www.ruby-forum.com/u/Delta_Y)\
**Post date:** [December 2, 2011, 9:20am UTC](https://www.ruby-forum.com/t/can-subrequest-be-used-in-log-phase/214454/2 "2011-12-02T09:20:49Z")

</div>

On Fri, Dec 2, 2011 at 4:05 PM, Delta Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I want to know whether subrequest can be used in log phase.

Nope 🙂

According to the source, log phase handlers can only do CPU-wise  
computations. But if anyone has managed to work around it, feel free  
to prove me wrong 🙂

Regards,  
-agentzh
