@creejs/commons-logging 1.0.8 → 2.0.2
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/dist/cjs/index-dev.cjs +1450 -0
- package/dist/cjs/index-dev.cjs.map +1 -0
- package/dist/cjs/index-min.cjs +2 -0
- package/dist/cjs/index-min.cjs.map +1 -0
- package/dist/esm/index-dev.js +1424 -0
- package/dist/esm/index-dev.js.map +1 -0
- package/dist/esm/index-min.js +2 -0
- package/dist/esm/index-min.js.map +1 -0
- package/dist/umd/index.dev.js +1456 -0
- package/dist/umd/index.dev.js.map +1 -0
- package/dist/umd/index.min.js +2 -0
- package/dist/umd/index.min.js.map +1 -0
- package/package.json +7 -9
- package/lib/console/console-log-factory.js +0 -72
- package/lib/console/console-log-provider.js +0 -26
- package/lib/console/console-logger.js +0 -84
- package/lib/console/index.js +0 -9
- package/lib/index.js +0 -286
- package/lib/log-config.js +0 -182
- package/lib/log-factory.js +0 -84
- package/lib/log-level.js +0 -181
- package/lib/log4js/index.js +0 -8
- package/lib/log4js/log4js-6x-config.js +0 -12
- package/lib/log4js/log4js-factory.js +0 -89
- package/lib/log4js/log4js-logger.js +0 -107
- package/lib/log4js/log4js-provider.js +0 -34
- package/lib/logger.js +0 -284
- package/lib/provider-type.js +0 -19
- package/lib/provider.js +0 -50
package/lib/provider-type.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @type {string}
|
|
3
|
-
* @memberof ProviderType
|
|
4
|
-
*/
|
|
5
|
-
export const Log4js = 'LOG4JS'
|
|
6
|
-
/**
|
|
7
|
-
* @type {string}
|
|
8
|
-
* @memberof ProviderType
|
|
9
|
-
*/
|
|
10
|
-
export const Console = 'CONSOLE'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @namespace ProviderType
|
|
14
|
-
* @description Define the static types
|
|
15
|
-
*/
|
|
16
|
-
export default {
|
|
17
|
-
Log4js,
|
|
18
|
-
Console
|
|
19
|
-
}
|
package/lib/provider.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// owned
|
|
2
|
-
// eslint-disable-next-line no-unused-vars
|
|
3
|
-
import LogFactory from './log-factory.js'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A interface that All Provider module must export
|
|
7
|
-
* @interface
|
|
8
|
-
*/
|
|
9
|
-
export default class Provider {
|
|
10
|
-
/**
|
|
11
|
-
* Checks if a value resembles a logging provider by verifying it has required methods.
|
|
12
|
-
* @param {*} value - The value to check
|
|
13
|
-
* @returns {boolean}
|
|
14
|
-
*/
|
|
15
|
-
static isProviderLike (value) {
|
|
16
|
-
if (value == null) {
|
|
17
|
-
return false
|
|
18
|
-
}
|
|
19
|
-
return typeof value === 'object' && typeof value.createLogFactory === 'function' && typeof value.getType === 'function'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Asserts that the given value is a valid provider-like object.
|
|
24
|
-
* @throws {Error} Throws an error if the value is not provider-like.
|
|
25
|
-
* @param {*} value - The value to check.
|
|
26
|
-
*/
|
|
27
|
-
static assertProviderLike (value) {
|
|
28
|
-
if (!this.isProviderLike(value)) {
|
|
29
|
-
throw new Error('Not LogProvider')
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The Type Name of current Provider
|
|
35
|
-
* @return {String} The type of the provider.
|
|
36
|
-
*/
|
|
37
|
-
getType () {
|
|
38
|
-
throw new Error('Not Impled Yet')
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Create a new LogFactory instance
|
|
43
|
-
* @param {*} [nativeLib] - The native library to use for logging.
|
|
44
|
-
* @param {*} [setting] - Configuration settings for the logging provider.
|
|
45
|
-
* @returns {LogFactory} A new instance of LogFactory.
|
|
46
|
-
*/
|
|
47
|
-
createLogFactory (nativeLib, setting) {
|
|
48
|
-
throw new Error('Not Impled Yet')
|
|
49
|
-
}
|
|
50
|
-
}
|