forked from log4js-node/log4js-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a error occur in `loggin-test.js` - 'invalid configuration'. It may reveal some internal defects of this library. Another problem occurs in `configureNoLevels-test.js`. I mark a **todo** there.
- Loading branch information
Showing
40 changed files
with
3,171 additions
and
2,933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"root": true, | ||
"extends": "airbnb-base", | ||
"rules": { | ||
"comma-dangle": 0, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../.eslintrc", | ||
"rules": { | ||
"no-plusplus": 0, | ||
"global-require": 0, | ||
"no-mixed-operators": 0, | ||
"no-underscore-dangle": 0, | ||
"guard-for-in": 0, | ||
"no-restricted-syntax": ["error", "WithStatement"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
"use strict"; | ||
var test = require('tape') | ||
, sandbox = require('sandboxed-module'); | ||
'use strict'; | ||
|
||
test('default settings', function(t) { | ||
var output = [] | ||
, log4js = sandbox.require( | ||
const test = require('tape'); | ||
const sandbox = require('sandboxed-module'); | ||
|
||
test('default settings', (t) => { | ||
const output = []; | ||
|
||
const log4js = sandbox.require( | ||
'../../lib/log4js', | ||
{ | ||
requires: { | ||
'./appenders/stdout': { | ||
'name': 'stdout', | ||
'appender': function () { | ||
return function(evt) { | ||
name: 'stdout', | ||
appender: function () { | ||
return function (evt) { | ||
output.push(evt); | ||
}; | ||
}, | ||
'configure': function (config) { | ||
configure: function () { | ||
return this.appender(); | ||
} | ||
} | ||
} | ||
} | ||
) | ||
, logger = log4js.getLogger("default-settings"); | ||
); | ||
|
||
const logger = log4js.getLogger('default-settings'); | ||
|
||
logger.info("This should go to stdout."); | ||
logger.info('This should go to stdout.'); | ||
|
||
t.plan(2); | ||
t.equal(output.length, 1, "It should log to stdout."); | ||
t.equal(output[0].data[0], "This should go to stdout.", "It should log the message."); | ||
t.equal(output.length, 1, 'It should log to stdout.'); | ||
t.equal(output[0].data[0], 'This should go to stdout.', 'It should log the message.'); | ||
t.end(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.