log4js-node/lib
osher cd3971cc03 fix bug: headers are changed after log entry emits
In the original version, the following operation looks synchronic, however it is not:

```
res.end = end;
res.end(data,enc);

//emit the log entry 
```

In fact, it starts a series of async operations, in which the request may yet be changed after the request log has already been emitted
(in our case - a change on request headers was observed, probably by some low level hook or hacky wrap of some http.ServerResponse method that's involved on the process - but called asynchronously)
what leads to situation that the request log does not capture valid data.
(observed by us:
 - request headers
 - calculated end time, when concerning big content
)

The fix just used `setTimeout(function() { /*emit the log entry*/ }, 1)`, but I'm afraid it may not hold true for big contents.
Well. maybe the headers part will, but the response time calculation will lie.

The fix relays on: http://nodejs.org/api/http.html#http_event_finish
2014-11-04 17:28:52 +02:00
..
appenders Merge pull request #242 from marcelog/marcelog_logstash_udp_appender 2014-09-11 09:20:42 +10:00
streams Closes #238 Updated async library in order to use lib in —use-strict mode 2014-08-28 12:04:02 +04:00
connect-logger.js fix bug: headers are changed after log entry emits 2014-11-04 17:28:52 +02:00
date_format.js Update date_format.js 2013-08-13 23:04:52 +08:00
debug.js moved debug fn out to own module, added tests 2013-06-24 08:51:10 +10:00
layouts.js #233: Adding ability to put pid in log layout pattern 2014-08-20 10:43:48 +01:00
levels.js more linting 2013-05-30 08:26:03 +10:00
log4js.js Closes #238 Updated async library in order to use lib in —use-strict mode 2014-08-28 12:04:02 +04:00
log4js.json added test for log roller, not written yet 2010-12-05 17:17:37 +11:00
logger.js Merge branch 'flush-on-exit' 2014-04-09 07:37:17 +10:00