Commit Graph

219 Commits

Author SHA1 Message Date
Gareth Jones
c6a0e58409 Merge pull request #89 from ixti/master
Fix possible memleak with `exit` event handlers
2012-08-13 16:32:08 -07:00
Aleksey V Zapparov
f832a2ba79 Do not assign multiple exit handlers for FA 2012-08-09 15:21:30 +02:00
Aleksey V Zapparov
3f10b68c30 Add test for amount of exit listeners in FA 2012-08-09 15:15:28 +02:00
Gareth Jones
54c311842c Merge pull request #86 from osher/patch-3
Update lib/layouts.js
2012-08-01 16:21:01 -07:00
osher
f948b5f5cd Add unit tests - layouts-test.js 2012-08-01 10:11:37 +03:00
osher
54e420eb58 Update lib/layouts.js
Errors sometimes carry additional attributes on them as part of the passed error data.
A utility that utilizes it, for example - is called 'errs', which is in use for instance 'nano' - the couch-db driver.

when only the stack is printed - all the additional information that is augmented on the error object does not sink to the log and is lost.

consider the following code:

```
//the oups throwing utility
function oups(){
  e = new Error();
  extend(
    { message    : "Oups error"
    , description: "huston, we got a problem"
    , status     : "MESS"
    , errorCode  : 991
    , arr :[1,2,3,4,{}]
    , data: 
      { c:{}
      , d:{e:{}}
      }
    }
  throw e;
}

var log = require('log4js')

try{
  oups()
} catch( e ) {
   log.error("error on oups", e );
}

```


output before the fix

```
error on oups Error: Oups error
    at repl:1:11
    at REPLServer.eval (repl.js:80:21)
    at Interface.<anonymous> (repl.js:182:12)
    at Interface.emit (events.js:67:17)
    at Interface._onLine (readline.js:162:10)
    at Interface._line (readline.js:426:8)
    at Interface._ttyWrite (readline.js:603:14)
    at ReadStream.<anonymous> (readline.js:82:12)
    at ReadStream.emit (events.js:88:20)
```


output after the fix would be

```
error on oups { [Error: My error message]
  name: 'Error',
  description: 'huston, we got a problem',
  status: 'MESS',
  errorCode: 991,
  arr: [ 1, 2, 3, 4, {} ],
  data: { c: {}, d: { e: {} } } }
Error: Oups error
    at repl:1:11
    at REPLServer.eval (repl.js:80:21)
    at Interface.<anonymous> (repl.js:182:12)
    at Interface.emit (events.js:67:17)
    at Interface._onLine (readline.js:162:10)
    at Interface._line (readline.js:426:8)
    at Interface._ttyWrite (readline.js:603:14)
    at ReadStream.<anonymous> (readline.js:82:12)
    at ReadStream.emit (events.js:88:20)
```
2012-07-31 14:32:03 +03:00
Gareth Jones
40ba24a55d Renamed tests so that vows will pick them up automatically 2012-07-31 14:52:36 +10:00
Gareth Jones
e3a20a1746 bumped npm version 2012-07-04 09:28:56 +10:00
Gareth Jones
7a02f39921 Fallback to \n if os.EOL is not defined 2012-07-04 09:25:08 +10:00
Gareth Jones
b6ba3bce00 Merge branch 'master' of https://github.com/nomiddlename/log4js-node 2012-07-04 09:11:07 +10:00
Gareth Jones
638ce187bb use os.EOL instead of \n 2012-07-04 08:53:09 +10:00
Gareth Jones
3cbae96a97 Changed multiprocess appender to use a single socket per client 2012-07-04 08:45:20 +10:00
Gareth Jones
a33e48cb07 Changed multiprocess appender to use a single socket per client 2012-07-04 08:44:50 +10:00
Gareth Jones
df491c0b14 Changed multiprocess appender to use a single socket per client 2012-07-04 08:44:16 +10:00
Gareth Jones
6ff1a2499f removed 0.7 added 0.8 2012-07-04 08:33:06 +10:00
Gareth Jones
ce2d7df8df Merge pull request #78 from druciak/smtp
SMTP appender migrated to nodemailer 0.3.x
2012-06-28 18:09:04 -07:00
Gareth Jones
1b12265800 Merge branch 'master' of https://github.com/nomiddlename/log4js-node 2012-06-29 10:53:38 +10:00
Gareth Jones
32e9045334 added explanation of console appender 2012-06-29 09:38:23 +10:00
Gareth Jones
1aed671137 added fromreadme.js example, updated README 2012-06-29 09:37:41 +10:00
Gareth Jones
68b47dd51c expanded example to include loading appender programmatically 2012-06-29 09:19:20 +10:00
Gareth Jones
8f9b4444f6 made sure example works with categories 2012-06-29 09:05:18 +10:00
Gareth Jones
e49f7107fb example now works 2012-06-29 09:01:42 +10:00
druciak
077302c772 SMTP appender migrated to nodemailer 0.3.x 2012-06-27 18:00:32 +02:00
Gareth Jones
6f0dfa0c5f Added note about console.log replacement. 2012-06-04 09:18:58 +10:00
Gareth Jones
82a6bee331 Fixed the wiki links. 2012-06-01 18:15:55 +10:00
Gareth Jones
ad7e844d68 bumped npm version 2012-06-01 18:13:00 +10:00
Gareth Jones
bef2075c60 moved some docs to the wiki 2012-06-01 18:12:30 +10:00
Gareth Jones
a046523804 Moved Logger into separate file, added support for loading appenders outside log4js, removed 'name' from appender requirements 2012-06-01 11:11:07 +10:00
Gareth Jones
0ed1a137d6 moved Logger class out of main module 2012-05-31 08:16:22 +10:00
Gareth Jones
33a92b5dd6 Removed some exports that are no longer needed 2012-05-31 08:07:45 +10:00
Gareth Jones
0901794b35 Moved abspath option checking into file appender, log4js options now passed to appenders 2012-05-31 07:50:01 +10:00
Gareth Jones
05d5265554 updated hook.io version, was breaking travis build 2012-05-29 16:59:26 +10:00
Gareth Jones
9a29d6222e changed minimum node version to 0.6 2012-05-29 16:52:50 +10:00
Gareth Jones
38a89dcf3d manually merged TooTallNate's pull request #62 2012-05-29 16:49:12 +10:00
Gareth Jones
754ac2c5ac changed config loading to be more predictable 2012-05-29 15:50:35 +10:00
Gareth Jones
ccc4976206 updated node versions for travis 2012-05-09 16:52:02 +10:00
Gareth Jones
6e7348f8d8 all tests pass 2012-05-09 16:48:52 +10:00
Gareth Jones
61078e88ef fixed the nolog tests 2012-05-09 16:40:27 +10:00
Gareth Jones
613a077a61 fixed test-configureNoLevels 2012-05-09 16:31:01 +10:00
Gareth Jones
68d1c8fa07 Merge pull request #69 from NetDevLtd/feature/setLevelAsymmetry
setLevel vs isLevelEnabled asymmetry
2012-05-08 16:38:55 -07:00
Gareth Jones
216937637d Merge pull request #70 from NetDevLtd/feature/configureNoLevels
log4js.configure({}) resets all loggers' levels to TRACE
2012-05-08 16:37:23 -07:00
Mike Bardzinski
ff5b8d2939 Added vows test for the log4js.configure inconsistency, when no 'levels' property is passed in the configuration 2012-05-08 19:19:33 +01:00
Mike Bardzinski
6a20efb965 Added vows tests for the setLevel asymmetry fix 2012-05-08 12:23:30 +01:00
Mike Bardzinski
872bc791c7 Fixes the log4js.configure({}) issue which zapped all loggers' levels to TRACE, even if they were previously set to something else 2012-05-02 16:10:20 +01:00
Mike Bardzinski
2c7b56853b Changed toLevel to accept a Log4js.Level (or in fact any object), and try to convert it to a Log4js.Level. Fixes the setLevel asymmetry, where you cannot setLevel(log4js.level.foo) 2012-05-02 15:41:32 +01:00
Gareth Jones
c8157cef5c fixed file appender tests 2012-03-22 09:34:41 +11:00
Gareth Jones
352653dcbe increased the wait for file open, think it is what's breaking travis build 2012-03-20 13:55:38 +11:00
Gareth Jones
cff6928761 bumped npm version 2012-03-20 09:39:56 +11:00
Gareth Jones
1fb8962b83 turned off debug in streams (issue #63) 2012-03-20 09:39:15 +11:00
Gareth Jones
d276bbc2f8 Bumped version number, added travis status to readme 2012-02-22 14:37:45 +11:00