@drenso/homey-log 9.34.1 → 9.35.0
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/build/index.d.ts +86 -86
- package/build/index.js +34 -34
- package/build/index.mjs +34 -34
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
export class Log {
|
|
2
|
-
/**
|
|
3
|
-
* Mimic SDK log method.
|
|
4
|
-
* @private
|
|
5
|
-
*/
|
|
6
|
-
private static _log;
|
|
7
|
-
/**
|
|
8
|
-
* Mimic SDK error method.
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
private static _error;
|
|
12
|
-
/**
|
|
13
|
-
* Mimic SDK timestamp.
|
|
14
|
-
* @returns {string}
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
private static _logTime;
|
|
18
|
-
/**
|
|
19
|
-
* Whether logging is forced.
|
|
20
|
-
* @returns {boolean}
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
private static _isLogForced;
|
|
24
|
-
/**
|
|
25
|
-
* Construct a new Log instance.
|
|
26
|
-
* @param {object} args
|
|
27
|
-
* @param {import('homey/lib/Homey').default} args.homey - `this.homey` instance in
|
|
28
|
-
* your app (e.g. `App#homey`/`Driver#homey`/`Device#homey`).
|
|
29
|
-
*
|
|
30
|
-
* @param {object} [args.options] - Additional options for Sentry
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* class MyApp extends Homey.App {
|
|
34
|
-
* onInit() {
|
|
35
|
-
* this.homeyLog = new Log({ homey: this.homey });
|
|
36
|
-
* }
|
|
37
|
-
* }
|
|
38
|
-
*/
|
|
39
|
-
constructor({ homey, options }: {
|
|
40
|
-
homey: import('homey/lib/Homey').default;
|
|
41
|
-
options?: object;
|
|
42
|
-
});
|
|
43
|
-
_capturedMessages: any[];
|
|
44
|
-
_capturedExceptions: any[];
|
|
45
|
-
_manifest: any;
|
|
46
|
-
_homeyVersion: any;
|
|
47
|
-
_managerCloud: any;
|
|
48
|
-
_homeyPlatform: any;
|
|
49
|
-
_homeyPlatformVersion: any;
|
|
50
|
-
/**
|
|
51
|
-
* Init Sentry.
|
|
52
|
-
* @param {string} dsn The Sentry DSN
|
|
53
|
-
* @param {object} opts Options to be passed to the Sentry init
|
|
54
|
-
* @returns {Log}
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
private init;
|
|
58
|
-
/**
|
|
59
|
-
* Set `tags` that will be sent as context with every message or error. See the Sentry Node.js
|
|
60
|
-
* documentation: https://docs.sentry.io/platforms/javascript/guides/node/enriching-events/tags/
|
|
61
|
-
* @param {object} tags
|
|
62
|
-
* @returns {Log}
|
|
63
|
-
*/
|
|
64
|
-
setTags(tags: object): Log;
|
|
65
|
-
/**
|
|
66
|
-
* Set `user` that will be sent as context with every message or error. See the Sentry Node.js
|
|
67
|
-
* documentation: https://docs.sentry.io/platforms/javascript/guides/node/enriching-events/identify-user/.
|
|
68
|
-
* @param {object} user
|
|
69
|
-
* @returns {Log}
|
|
70
|
-
*/
|
|
71
|
-
setUser(user: object): Log;
|
|
72
|
-
/**
|
|
73
|
-
* Create and send message event to Sentry. See the Sentry Node.js documentation:
|
|
74
|
-
* https://docs.sentry.io/platforms/javascript/guides/node/usage/
|
|
75
|
-
* @param {string} message - Message to be sent
|
|
76
|
-
* @returns {Promise<string>|undefined}
|
|
77
|
-
*/
|
|
78
|
-
captureMessage(message: string): Promise<string> | undefined;
|
|
79
|
-
/**
|
|
80
|
-
* Create and send exception event to Sentry. See the sentry Node.js documentation:
|
|
81
|
-
* https://docs.sentry.io/platforms/javascript/guides/node/usage/
|
|
82
|
-
* @param {Error} err - Error instance to be sent
|
|
83
|
-
* @returns {Promise<string>|undefined}
|
|
84
|
-
*/
|
|
85
|
-
captureException(err: Error): Promise<string> | undefined;
|
|
86
|
-
}
|
|
1
|
+
export class Log {
|
|
2
|
+
/**
|
|
3
|
+
* Mimic SDK log method.
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
private static _log;
|
|
7
|
+
/**
|
|
8
|
+
* Mimic SDK error method.
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
private static _error;
|
|
12
|
+
/**
|
|
13
|
+
* Mimic SDK timestamp.
|
|
14
|
+
* @returns {string}
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private static _logTime;
|
|
18
|
+
/**
|
|
19
|
+
* Whether logging is forced.
|
|
20
|
+
* @returns {boolean}
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
private static _isLogForced;
|
|
24
|
+
/**
|
|
25
|
+
* Construct a new Log instance.
|
|
26
|
+
* @param {object} args
|
|
27
|
+
* @param {import('homey/lib/Homey').default} args.homey - `this.homey` instance in
|
|
28
|
+
* your app (e.g. `App#homey`/`Driver#homey`/`Device#homey`).
|
|
29
|
+
*
|
|
30
|
+
* @param {object} [args.options] - Additional options for Sentry
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* class MyApp extends Homey.App {
|
|
34
|
+
* onInit() {
|
|
35
|
+
* this.homeyLog = new Log({ homey: this.homey });
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
constructor({ homey, options }: {
|
|
40
|
+
homey: import('homey/lib/Homey').default;
|
|
41
|
+
options?: object;
|
|
42
|
+
});
|
|
43
|
+
_capturedMessages: any[];
|
|
44
|
+
_capturedExceptions: any[];
|
|
45
|
+
_manifest: any;
|
|
46
|
+
_homeyVersion: any;
|
|
47
|
+
_managerCloud: any;
|
|
48
|
+
_homeyPlatform: any;
|
|
49
|
+
_homeyPlatformVersion: any;
|
|
50
|
+
/**
|
|
51
|
+
* Init Sentry.
|
|
52
|
+
* @param {string} dsn The Sentry DSN
|
|
53
|
+
* @param {object} opts Options to be passed to the Sentry init
|
|
54
|
+
* @returns {Log}
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
private init;
|
|
58
|
+
/**
|
|
59
|
+
* Set `tags` that will be sent as context with every message or error. See the Sentry Node.js
|
|
60
|
+
* documentation: https://docs.sentry.io/platforms/javascript/guides/node/enriching-events/tags/
|
|
61
|
+
* @param {object} tags
|
|
62
|
+
* @returns {Log}
|
|
63
|
+
*/
|
|
64
|
+
setTags(tags: object): Log;
|
|
65
|
+
/**
|
|
66
|
+
* Set `user` that will be sent as context with every message or error. See the Sentry Node.js
|
|
67
|
+
* documentation: https://docs.sentry.io/platforms/javascript/guides/node/enriching-events/identify-user/.
|
|
68
|
+
* @param {object} user
|
|
69
|
+
* @returns {Log}
|
|
70
|
+
*/
|
|
71
|
+
setUser(user: object): Log;
|
|
72
|
+
/**
|
|
73
|
+
* Create and send message event to Sentry. See the Sentry Node.js documentation:
|
|
74
|
+
* https://docs.sentry.io/platforms/javascript/guides/node/usage/
|
|
75
|
+
* @param {string} message - Message to be sent
|
|
76
|
+
* @returns {Promise<string>|undefined}
|
|
77
|
+
*/
|
|
78
|
+
captureMessage(message: string): Promise<string> | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Create and send exception event to Sentry. See the sentry Node.js documentation:
|
|
81
|
+
* https://docs.sentry.io/platforms/javascript/guides/node/usage/
|
|
82
|
+
* @param {Error} err - Error instance to be sent
|
|
83
|
+
* @returns {Promise<string>|undefined}
|
|
84
|
+
*/
|
|
85
|
+
captureException(err: Error): Promise<string> | undefined;
|
|
86
|
+
}
|