-
Notifications
You must be signed in to change notification settings - Fork 9.3k
/
entry.js
49 lines (42 loc) · 897 Bytes
/
entry.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'./levels-pool'
], function (logLevels) {
'use strict';
/**
* @param {String} message
* @param {Number} level
* @param {Object} [data]
*/
function LogEntry(message, level, data) {
/**
* @readonly
* @type {Number}
*/
this.timestamp = Date.now();
/**
* @readonly
* @type {Number}
*/
this.level = level;
/**
* @readonly
* @type {String}
*/
this.levelName = logLevels.getNameByCode(level);
/**
* @readonly
* @type {Object}
*/
this.data = data;
/**
* @readonly
* @type {String}
*/
this.message = message;
}
return LogEntry;
});