Hi all,

  Today, I have been working in a tracing facility for Cherokee..

  Basically it allows you to define a environment variable which the
  definition of what you want to trace.  Let's see a few examples
  about how it works:

===
# CHEROKEE_TRACE="handler" /usr/sbin/cherokee
   handler_redir.c:0244 (    cherokee_handler_redir_new): URL: (null)
   handler_redir.c:0087 (             build_regexs_list): Added pattern 
"^/projects/(.+)/$"
   handler_redir.c:0159 (          match_and_substitute): subject = "/projects/example/" 
+ len("")
   handler_redir.c:0160 (          match_and_substitute): pcre_exec: 
subject="/projects/example/" -> 2
   handler_redir.c:0192 (          match_and_substitute): Hidden redirect to: 
request="/index.php" query_string="pagename=example"
===

===
# CHEROKEE_TRACE="thread" /usr/sbin/cherokee
          thread.c:0524 (    process_active_connections): conn on phase n=3: 
Reading header
          thread.c:0697 (    process_active_connections): Setup connection begins: 
request="/projects/example/"
          thread.c:0524 (    process_active_connections): conn on phase n=6: 
Setup connection
          thread.c:0697 (    process_active_connections): Setup connection begins: 
request="/index.php"
          thread.c:0524 (    process_active_connections): conn on phase n=7: 
Init connection
          thread.c:0524 (    process_active_connections): conn on phase n=11: 
Lingering close
===

  .. and, now let's try with CHEROKEE_TRACE="handler,thread"

===
          thread.c:0524 (    process_active_connections): conn on phase n=3: 
Reading header
          thread.c:0697 (    process_active_connections): Setup connection begins: 
request="/projects/example/"
   handler_redir.c:0244 (    cherokee_handler_redir_new): URL: (null)
   handler_redir.c:0087 (             build_regexs_list): Added pattern 
"^/projects/(.+)/$"
   handler_redir.c:0159 (          match_and_substitute): subject = "/projects/example/" 
+ len("")
   handler_redir.c:0160 (          match_and_substitute): pcre_exec: 
subject="/projects/example/" -> 2
   handler_redir.c:0192 (          match_and_substitute): Hidden redirect to: 
request="/index.php" query_string="pagename=example"
          thread.c:0524 (    process_active_connections): conn on phase n=6: 
Setup connection
          thread.c:0697 (    process_active_connections): Setup connection begins: 
request="/index.php"
          thread.c:0524 (    process_active_connections): conn on phase n=7: 
Init connection
          thread.c:0524 (    process_active_connections): conn on phase n=11: 
Lingering close
===

  Pretty handy, don't you think? :-)

  Ah, there is an special value "all" which activates all the tracing
  check points.

  This feature carries a performance penalty for the server, so it is
  NOT enabled by default, you will need to compile Cherokee using the
  --enable-trace in order to activate it.

--
Greetings, alo.
http://www.alobbs.com
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to