* @param {(!Level|string|number)} level The entry level. * @param {string} message The log message. * @param {number=} opt_timestamp The time this entry was generated, in * milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the * current time will be used. * @param {
(level, message, opt_timestamp, opt_type)
| 218 | * @param {string=} opt_type The log type, if known. |
| 219 | */ |
| 220 | constructor(level, message, opt_timestamp, opt_type) { |
| 221 | this.level = level instanceof Level ? level : getLevel(level) |
| 222 | this.message = message |
| 223 | this.timestamp = typeof opt_timestamp === 'number' ? opt_timestamp : Date.now() |
| 224 | this.type = opt_type || '' |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * @return {{level: string, message: string, timestamp: number, |