@webex/plugin-logger 2.59.2 → 2.59.3-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -6
- package/README.md +82 -82
- package/babel.config.js +3 -3
- package/dist/config.js +13 -13
- package/dist/config.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/logger.js +75 -75
- package/dist/logger.js.map +1 -1
- package/jest.config.js +3 -3
- package/package.json +17 -16
- package/process +1 -1
- package/src/config.js +23 -23
- package/src/index.js +15 -15
- package/src/logger.js +427 -427
- package/test/unit/spec/logger.js +805 -805
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-logger",
|
|
3
|
-
"version": "2.59.2",
|
|
4
3
|
"description": "",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"main": "dist/index.js",
|
|
@@ -21,33 +20,35 @@
|
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"@babel/core": "^7.17.10",
|
|
24
|
-
"@webex/babel-config-legacy": "
|
|
25
|
-
"@webex/eslint-config-legacy": "
|
|
26
|
-
"@webex/jest-config-legacy": "
|
|
27
|
-
"@webex/legacy-tools": "
|
|
28
|
-
"@webex/test-helper-chai": "2.59.
|
|
29
|
-
"@webex/test-helper-mocha": "2.59.
|
|
30
|
-
"@webex/test-helper-mock-webex": "2.59.
|
|
31
|
-
"@webex/test-helper-test-users": "2.59.
|
|
23
|
+
"@webex/babel-config-legacy": "^0.0.0",
|
|
24
|
+
"@webex/eslint-config-legacy": "^0.0.0",
|
|
25
|
+
"@webex/jest-config-legacy": "^0.0.0",
|
|
26
|
+
"@webex/legacy-tools": "^0.0.0",
|
|
27
|
+
"@webex/test-helper-chai": "^2.59.3-next.1",
|
|
28
|
+
"@webex/test-helper-mocha": "^2.59.3-next.1",
|
|
29
|
+
"@webex/test-helper-mock-webex": "^2.59.3-next.1",
|
|
30
|
+
"@webex/test-helper-test-users": "^2.59.3-next.1",
|
|
32
31
|
"eslint": "^8.24.0",
|
|
33
32
|
"prettier": "^2.7.1",
|
|
34
33
|
"sinon": "^9.2.4"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@webex/common": "2.59.
|
|
38
|
-
"@webex/test-helper-chai": "2.59.
|
|
39
|
-
"@webex/test-helper-mocha": "2.59.
|
|
40
|
-
"@webex/test-helper-mock-webex": "2.59.
|
|
41
|
-
"@webex/webex-core": "2.59.
|
|
36
|
+
"@webex/common": "^2.59.3-next.1",
|
|
37
|
+
"@webex/test-helper-chai": "^2.59.3-next.1",
|
|
38
|
+
"@webex/test-helper-mocha": "^2.59.3-next.1",
|
|
39
|
+
"@webex/test-helper-mock-webex": "^2.59.3-next.1",
|
|
40
|
+
"@webex/webex-core": "^2.59.3-next.1",
|
|
42
41
|
"lodash": "^4.17.21"
|
|
43
42
|
},
|
|
44
43
|
"scripts": {
|
|
45
44
|
"build": "yarn build:src",
|
|
46
45
|
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
46
|
+
"deploy:npm": "yarn npm publish",
|
|
47
47
|
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
48
48
|
"test:browser": "webex-legacy-tools test --integration --unit --runner karma",
|
|
49
49
|
"test:integration": "webex-legacy-tools test --integration --runner mocha",
|
|
50
50
|
"test:style": "eslint ./src/**/*.*",
|
|
51
51
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
52
|
-
}
|
|
53
|
-
|
|
52
|
+
},
|
|
53
|
+
"version": "2.59.3-next.1"
|
|
54
|
+
}
|
package/process
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {browser: true};
|
|
1
|
+
module.exports = {browser: true};
|
package/src/config.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @typedef {Object} LoggerConfig
|
|
7
|
-
* @property {string} [level=process.env.WEBEX_LOG_LEVEL] - Maximum log level that
|
|
8
|
-
* should be printed to the console. One of
|
|
9
|
-
* silent|error|warn|log|info|debug|trace
|
|
10
|
-
* @property {number} [historyLength=1000] - Maximum number of entries to store in the log buffer.
|
|
11
|
-
* @example
|
|
12
|
-
* {
|
|
13
|
-
* level: process.env.WEBEX_LOG_LEVEL,
|
|
14
|
-
* historyLength: 1000
|
|
15
|
-
* }
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
logger: {
|
|
20
|
-
level: process.env.WEBEX_LOG_LEVEL,
|
|
21
|
-
historyLength: 1000,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {Object} LoggerConfig
|
|
7
|
+
* @property {string} [level=process.env.WEBEX_LOG_LEVEL] - Maximum log level that
|
|
8
|
+
* should be printed to the console. One of
|
|
9
|
+
* silent|error|warn|log|info|debug|trace
|
|
10
|
+
* @property {number} [historyLength=1000] - Maximum number of entries to store in the log buffer.
|
|
11
|
+
* @example
|
|
12
|
+
* {
|
|
13
|
+
* level: process.env.WEBEX_LOG_LEVEL,
|
|
14
|
+
* historyLength: 1000
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
logger: {
|
|
20
|
+
level: process.env.WEBEX_LOG_LEVEL,
|
|
21
|
+
historyLength: 1000,
|
|
22
|
+
},
|
|
23
|
+
};
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import {registerPlugin} from '@webex/webex-core';
|
|
6
|
-
|
|
7
|
-
import Logger from './logger';
|
|
8
|
-
import config from './config';
|
|
9
|
-
|
|
10
|
-
registerPlugin('logger', Logger, {
|
|
11
|
-
config,
|
|
12
|
-
replace: true,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export {default, levels} from './logger';
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {registerPlugin} from '@webex/webex-core';
|
|
6
|
+
|
|
7
|
+
import Logger from './logger';
|
|
8
|
+
import config from './config';
|
|
9
|
+
|
|
10
|
+
registerPlugin('logger', Logger, {
|
|
11
|
+
config,
|
|
12
|
+
replace: true,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export {default, levels} from './logger';
|