-
Notifications
You must be signed in to change notification settings - Fork 1
/
etools-logs-mixin.d.ts
34 lines (31 loc) · 1.14 KB
/
etools-logs-mixin.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { PolymerElement } from '@polymer/polymer';
export default EtoolsLogsMixin;
interface Constructor<T = {}> {
new (...args: any[]) : T;
}
/**
* Can be used to log errors, warnings and other info like this.
*
* Each method can have 3 args:
* - the message you want to log
* - a prefix for log message
* - additional data, anything
*
* ## Available logging levels (the levels are cumulative)
* - OFF (default)
* - ERROR - only errors will be displayed
* - WARN - errors and warning will be displayed
* - INFO - errors, warning and info logs displayed
*
* To configure the logging level in your app config do this:
* window.EtoolsLogsLevel = window.EtoolsLogsLevel || 'INFO';
*/
declare function EtoolsLogsMixin<T extends Constructor<PolymerElement>>(base: T):
{
new (...args: any[]): {
etoolsLogsLevel: string|null|undefined;
logError(message: any, messagePrefix?: any, other?: any, forceLevelInit?: any): void;
logWarn(message: any, messagePrefix?: any, other?: any, forceLevelInit?: any): void;
logInfo(message: any, messagePrefix?: any, other?: any, forceLevelInit?: any): void;
};
} & T & Constructor<PolymerElement> ;