Commit Graph

501 Commits

Author SHA1 Message Date
Imanuel Ulbricht
e07adf2ca4 Update README.md 2014-11-28 17:49:46 +01:00
Gareth Jones
ec5f4485f8 Merge pull request #258 from osher/patch-4
fix bug: headers are changed after log entry emits
2014-11-16 09:19:47 +11:00
osher
2f44dbf53e 0.8 compatibility 2014-11-05 11:58:09 +02:00
osher
9da158f945 fix tests - they have to be async! 2014-11-05 11:49:21 +02:00
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
Gareth Jones
176d44833e 0.6.21 2014-09-11 09:26:02 +10:00
Gareth Jones
988e9a41f6 added license info 2014-09-11 09:23:55 +10:00
Gareth Jones
39ce97d140 Merge pull request #242 from marcelog/marcelog_logstash_udp_appender
adding logstash UDP appender
2014-09-11 09:20:42 +10:00
Gareth Jones
c753fe37bb Merge pull request #243 from laenger/master
pass options to wrapped appender in logLevelFilter
2014-09-11 09:16:46 +10:00
Marcelo Gornstein
a7a0964803 adding logstash UDP appender 2014-09-10 13:03:21 -03:00
Christian Langer
82950eb965 pass options to wrapped appender in logLevelFilter 2014-09-09 03:28:02 +02:00
Gareth Jones
cacade0a37 Merge pull request #239 from lazutkin/gh-238
Closes #238 Updated async library
2014-09-02 19:33:58 +10:00
Dmitry M. Lazutkin
7558a3c367 Closes #238 Updated async library in order to use lib in —use-strict mode 2014-08-28 12:04:02 +04:00
Gareth Jones
fb072dd70d 0.6.20 2014-08-26 09:59:10 +10:00
Gareth Jones
af1ce2933b Merge pull request #236 from jchmura/filter-max-level
Added option for maximum level in logLevelFilter
2014-08-26 09:55:13 +10:00
Jakub Chmura
ade6dd8ea0 Adjusting and adding new tests for logLevelFilter to handle the maxLevel option. 2014-08-25 20:56:37 +02:00
Jakub Chmura
00c62c7fa6 Adding maxLevel to levelFilter.
This optional parameter specifies what maximum level of event is accepted by the filter.
2014-08-25 19:48:15 +02:00
Gareth Jones
ae04cc9a4a 0.6.19 2014-08-21 21:21:16 +10:00
Gareth Jones
70a9444f4d Merge pull request #235 from j2ro/master
Pull request for #233
2014-08-21 21:20:27 +10:00
j2ro
3e78fcb630 #233: Adding ability to put pid in log layout pattern 2014-08-20 10:43:48 +01:00
j2ro
44687e1bd1 #233: Adding ability to put pid in log layout pattern 2014-08-20 10:23:31 +01:00
Gareth Jones
8e5754371a 0.6.18 2014-08-20 10:20:57 +01:00
Grégoire Charvet 黑瓜
feef9975c7 Remove test logging 2014-08-20 10:20:57 +01:00
Grégoire Charvet 黑瓜
93695fbfc4 Change spaces by tabs
Keeping constitency with the rest of the code.
2014-08-20 10:20:57 +01:00
Grégoire Charvet 黑瓜
0571089a8b Correctly send message, level and hostname
Fix issue #230 where the level would hold the message and the log level
information would be lost.
2014-08-20 10:20:57 +01:00
Gareth Jones
ab77895555 0.6.18 2014-08-20 09:12:13 +10:00
Gareth Jones
9637be8a41 Merge pull request #232 from GregoireDigbil/fix_loggly_formatting
Fix loggly formatting
2014-08-20 09:11:12 +10:00
Grégoire Charvet 黑瓜
0ecd729f49 Remove test logging 2014-08-18 07:32:23 +08:00
Grégoire Charvet 黑瓜
f9c2e78055 Change spaces by tabs
Keeping constitency with the rest of the code.
2014-08-18 07:31:33 +08:00
Grégoire Charvet 黑瓜
e7267ecf46 Correctly send message, level and hostname
Fix issue #230 where the level would hold the message and the log level
information would be lost.
2014-08-18 07:25:55 +08:00
Gareth Jones
c03185b563 Merge pull request #231 from eurekaa/buffered-logger
added getBufferedLogger function.
2014-08-17 11:00:10 +10:00
Stefano Graziato
c0aa8c5c86 gitignore 2014-08-16 14:52:00 +02:00
Stefano Graziato
59a6703549 getBufferedLogger tested. 2014-08-16 14:22:58 +02:00
Gareth Jones
ceffdf92e4 Removed hook.io appender, because hook.io does not build on systems without python 2014-08-16 12:23:50 +10:00
Stefano Graziato
c9e72d0f00 added getBufferedLogger function.
This function should be useful when you need to log during async
parallel operations, without having a mess in logs.
For example when you walk asynchronously a directory and you want logs
to be grouped by file.

It returns the same getLogger() object but messages are stored
internally and sent to appenders only when you call the flush() method
on it.
2014-08-15 13:42:08 +02:00
Gareth Jones
a27345461b altering the timings on some tests to make them slightly less flaky (maybe) 2014-08-15 20:06:35 +10:00
Gareth Jones
fb9948145c 0.6.17 2014-08-15 18:32:32 +10:00
Gareth Jones
0242bae78f Merge pull request #214 from GregoireDigbil/master
Format message before adding loggly metadata
2014-08-15 18:29:19 +10:00
Gareth Jones
b71f635267 Merge pull request #224 from idalv/express_fix
Update connect-logger.js to work correctly with express
2014-08-02 03:30:05 +10:00
mishless
66872d136d Update connect-logger.js to work correctly with express
When used with express levels are wrong since send() does not call writeHead, but sets responseCode on response.
2014-07-30 13:06:51 +03:00
Gareth Jones
49849a545a Merge pull request #219 from PSyton/fix_for_no_dir
Make some test windows friendly.
2014-07-18 08:43:27 +10:00
Pavel Sysolyatin
3c4c98bb0b Make some test windows friendly. 2014-07-17 14:29:03 +07:00
Gareth Jones
eaa77b0454 0.6.16 2014-07-12 17:46:03 +10:00
Gareth Jones
78c604b90d Merge branch 'mayconbordin-master' 2014-07-12 17:33:31 +10:00
Gareth Jones
4648e7a5e6 Merge branch 'master' of https://github.com/mayconbordin/log4js-node into mayconbordin-master 2014-07-12 17:18:07 +10:00
Gareth Jones
8f3e040786 Merge branch 'RolfKoenders-set-global-log-level' 2014-07-12 17:09:30 +10:00
Gareth Jones
60d2e093ae Merge branch 'set-global-log-level' of https://github.com/RolfKoenders/log4js-node into RolfKoenders-set-global-log-level 2014-07-12 17:08:39 +10:00
Gareth Jones
a06478632e Merge 2ion-gelf-spec-v1.1-compliance into master 2014-07-12 15:12:40 +10:00
Gareth Jones
a4d55b3339 fixed up test after merge 2014-07-12 15:11:21 +10:00
Gareth Jones
914ed5356b Merge pull request #216 from 2ion/gelf-no-full-message
GELF appender: don't send full_message field
2014-07-12 15:02:17 +10:00