135 Commits

Author SHA1 Message Date
Gareth Jones
0007623aa9 Merge pull request #364 from demmer/add-stderr-appender
add a stderr appender
2016-04-15 09:26:53 +10:00
Gareth Jones
321621e6ef Merge pull request #366 from cohi/master
Adding slack appender
2016-04-15 08:42:01 +10:00
Artem Karpenko
75ae085ae9 Missing newline 2016-04-06 19:14:35 +03:00
Artem Karpenko
a386a087cf Added shutdown hook for gelf appender 2016-04-06 19:06:34 +03:00
cohi
3457199ebc adding slack appender 2016-03-27 16:20:23 +03:00
Michael Demmer
5e64fbd90b add a stderr appender
Thus functions almost identically to the consoleAppender except that
instead of logging through `console.log` it uses `process.stderr.write`.
2016-03-24 14:56:28 -07:00
Justin Gordon
a9f52faa46 Add new appender logglyTagged
This appender allows adding tags to any call to the logger.

Documentation added:

Loggly Appender. Sends logging events to Loggly using node-loggly,
optionally setting tags.

This appender will scan the msg from the logging event, and pull out
any argument of the shape `{ tags: [] }` so that it's possible
to add tags in a normal logging call. If an object contains tags and
other members, that object is not used for loggly tagging.

For example:

logger.info({ tags: ['my-tag-1', 'my-tag-2'] }, 'Some message', someObj, ...)

And then this appender will remove the tags param and append it to the config.tags.
2016-03-03 18:44:43 -10:00
Gareth Jones
df19764db7 Merge pull request #355 from Smurf-IV/master
Make categoryFilter respect cwd option
2016-02-29 08:37:47 +11:00
Chris Potter
cd92505bbf Missed one config -> _config 2016-02-11 21:43:20 -05:00
Chris Potter
dc7bda44f0 Removed unneeded console.log and extraneous variable declarations. 2016-02-11 21:34:26 -05:00
Chris Potter
36d189c595 Add name to hipchat entity. 2016-02-11 17:37:17 -05:00
Chris Potter
3a6f670be8 Add hipchat and hipchat-test according to mailgun appender. 2016-02-11 17:13:05 -05:00
Smurf-IV
d67db85869 Make categoryFilter respect cwd option
https://github.com/nomiddlename/log4js-node/issues/351
2016-02-08 14:49:43 +00:00
Gareth Jones
43700b1536 Merge pull request #348 from chewax/feature/mailgunAppender
Feature/MailGunAppender
2016-02-02 10:37:45 +11:00
Daniel
436782b614 Removed mailgun-js dependency from package.json. Added missing colon to /lib/appenders/mailgun.js 2016-02-01 12:30:24 -02:00
chewax
df961350bc Feature/MailGunAppender 2016-01-29 17:03:35 -02:00
Alex Kocharin
fc3ae676f1 fix shutdown callbacks not being called 2016-01-29 14:50:51 +00:00
Hugues Malphettes
3be1c25455 Replace async by native recursions 2016-01-15 11:59:47 +08:00
Gareth Jones
0fc65d38eb Merge pull request #336 from gchauvet/master
Send logs as email attachment
2016-01-07 08:09:53 +11:00
Hugues Malphettes
6746e2e048 remove the underscore dependency 2016-01-06 11:23:40 +08:00
Guillaume Chauvet
0936052f65 Refactoring: removing redundant check 2015-12-09 11:03:59 +01:00
Guillaume Chauvet
9df030c32c Fix typo 2015-11-27 15:10:52 +01:00
Guillaume Chauvet
fb9fee9c54 implementation for sending logs as email attachment instead of body content 2015-11-27 14:30:21 +01:00
Guillaume Chauvet
273aaf68b1 Sends a single email with remaining logs when shutdown is called 2015-11-23 11:07:51 +01:00
Guillaume Chauvet
5db457beee Format source code 2015-11-19 15:45:17 +01:00
Gareth Jones
e725bec031 removed unused function 2015-11-06 08:40:05 +11:00
Alexei Tarnakin
5e428cb58e Returned layout support in logstashUDP appender. Tests added 2015-10-30 16:15:18 +03:00
Alexei Tarnakin
a961f7ea07 extra json data fields for logstash 2015-10-09 16:57:58 +03:00
Gareth Jones
b37c171e5c Merge pull request #305 from pmalouin/patch-1
clustered appender - Unwrap the serialized errors
2015-09-22 08:28:16 +10:00
Edward Zborowski
5f3a0f293a Use a nodemailer transport plugin if transport option is provided 2015-07-08 21:41:08 -04:00
Patrick Malouin
7c22fb5752 clustered appender - Unwrap the serialized errors
When logging an `Error` object using the clustered appender, the logged event is a JSON representation of the error, ex:
[2015-06-09 11:13:48.257] [ERROR] middleware.Security - { stack: 'Error: User is not authorized\n at Object.exec (D:\\Borealis\\demoux\\IMS\\server\\IMS\\middleware\\SecurityCheck\\Instance.js:41:14)\n [...] at applyArgs (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:9:15)\n at Function.flowState (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:39:6)\n at applyArgs (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:9:15)\n at Function.thisFlow.exec (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:94:4)\n at applyArgs (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:9:15)\n at thisFlow (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:15:4)\n at Object.exec (D:\\Borealis\\demoux\\IMS\\server\\node_modules\\flow\\flow.js:103:42)' } 

The error should be formatted identically as with other appenders (e.g. only printing the stack).

This changes adds a check for a `stack` attribute on the serialized loggingEvent and unwraps the errors while deserializing it. Result is:
[2015-06-09 11:13:48.257] [ERROR] middleware.Security - Error: User is not authorized
 at Object.exec (D:\Borealis\demoux\IMS\server\IMS\middleware\SecurityCheck\Instance.js:41:14)
 at applyArgs (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:9:15)
 at Function.flowState (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:39:6)
 at applyArgs (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:9:15)
 at Function.thisFlow.exec (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:94:4)
 at applyArgs (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:9:15)
 at thisFlow (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:15:4)
 at Object.exec (D:\Borealis\demoux\IMS\server\node_modules\flow\flow.js:103:42)
2015-06-10 10:32:36 -04:00
Skylar Lowery
3cf1d697e8 Remove GELF flag when capturing custom fields
* Logstash (which supports GELF) drops messages with this key
* There's no particular need to keep this key
2015-04-24 11:14:17 -06:00
hasegawa-jun
ebfcf94db3 make sure to call require() 2015-04-17 10:08:00 +09:00
Gareth Jones
eb87ccb78d Merge pull request #277 from hasegawa-jun/shutdown-smtp-appender
Implemented shutdown function for SMTP appender
2015-04-17 08:12:17 +10:00
Gareth Jones
8360bb732c Merge pull request #282 from qbrandon/master
Add appender-level timezone offset config
2015-04-17 08:10:15 +10:00
alawatthe
57fc9e7aa0 The smtp appender now works with the current version of nodemailer 2015-04-11 12:03:14 +02:00
Quentin Brandon
af69eddd1c Add optional timezoneOffset config for appenders
Example:
    log4js.configure({
        appenders: [{type: 'console', timezoneOffset: -540}],
        replaceConsole: true
    });

The expected value is the equivalent of (new Date).getTimezoneOffset()
In this example, -540 is the value for JST.
This allows machines members of world-wide-spread cluster to all report
log time-stamps using the same timezone (or adapt the timezone to a
local different from the system)
2015-03-20 11:51:23 +09:00
hasegawa-jun
4dfe14a0c2 added shutdownTimeout option 2015-03-17 09:25:22 +09:00
hasegawa-jun
adfad9ad20 Implemented shutdown function for SMTP appender 2015-03-04 09:13:30 +09:00
Gareth Jones
d31521bac0 Merge pull request #240 from vivocha/vivocha-0.6.20
Vivocha 0.6.20
2015-01-10 15:34:31 +11:00
Gareth Jones
c624aef282 Merge pull request #261 from boljen/clusterpid
added cluster identifier support
2015-01-10 15:29:01 +11:00
sc2bigjoe
1629e01df9 Update smtp.js
added the ability for smtp appender to send message as html instead of plaintext. in your log4js.config file simply include "html": "true", to write out as html, otherwise it will send plaintext
2014-12-17 11:28:50 -05:00
Christophe Bol
b694fd1d8d added cluster identifier support 2014-12-01 12:29:45 +01: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
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
Luis Malheiro
17c9b29ca5 Removed property 'level' from the file appender, because that functionality is provided by appender logLevelFilter. 2014-09-08 11:33:22 +02:00
Luis Malheiro
036293db41 Log compression. 2014-08-29 16:33:41 +02:00
Luis Malheiro
6fa998408a Adds subcategories to the appenders and loggers. Adds property "level" at the file appender to limit the levels that a file appender accepts.
Creates a MARK category that always write to the log. That's useful to write things like '---- STARTED ----'.
2014-08-29 16:33:32 +02: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