Am Donnerstag, den 02.11.2006, 12:07 -0700 schrieb David Wortham: > I have one file that opens in a given function. I need to open > another file > and close it about the same time: just before the end of the same > function. > I copy-pasted the code that correctly opens the first file but I am > not > seeing the second file open (it is never created, whereas the first > file is > created every time). The purpose of the files are to (1) trace the > processing path and write to file the results of each conditional to > file 1 > and (2) dump the entire contents of the in-memory data structure to > file 2. > I am having a hard time reconsiling what child process has what > requesting > IP addresses stored in a recent-hit cache and these files seem like > the only > way to debug this.
To alternatives come to my mind. 1. You could write all data to the error log with ap_log_rerror. 2. You could write your data into notes with the notes api and the log these note with %{notename}n together with the pid and other interesting data in a special custom log. http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats To learn about notes read about ap_register_request_note, ap_get_request_note in http_core.h. I have used them once, see http://www.heute-morgen.de/modules/mod_delay/mod_delay.c for a simple example. Hth, Joachim