mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
Fix all lib/ files with ESLint rules with 0 errors.
This commit is contained in:
parent
994977ea94
commit
434f63b3a9
69 changed files with 793 additions and 764 deletions
|
@ -28,6 +28,32 @@ Logger.LevelLabel = {
|
|||
|
||||
Logger.globalIdentifier = '*'
|
||||
|
||||
function Log(tag) {
|
||||
this.tag = tag
|
||||
this.names = {
|
||||
1: 'DBG'
|
||||
, 2: 'VRB'
|
||||
, 3: 'INF'
|
||||
, 4: 'IMP'
|
||||
, 5: 'WRN'
|
||||
, 6: 'ERR'
|
||||
, 7: 'FTL'
|
||||
}
|
||||
this.styles = {
|
||||
1: 'grey'
|
||||
, 2: 'cyan'
|
||||
, 3: 'green'
|
||||
, 4: 'magenta'
|
||||
, 5: 'yellow'
|
||||
, 6: 'red'
|
||||
, 7: 'red'
|
||||
}
|
||||
this.localIdentifier = null
|
||||
events.EventEmitter.call(this)
|
||||
}
|
||||
|
||||
util.inherits(Log, events.EventEmitter)
|
||||
|
||||
Logger.createLogger = function(tag) {
|
||||
return new Log(tag)
|
||||
}
|
||||
|
@ -37,32 +63,6 @@ Logger.setGlobalIdentifier = function(identifier) {
|
|||
return Logger
|
||||
}
|
||||
|
||||
function Log(tag) {
|
||||
this.tag = tag
|
||||
this.names = {
|
||||
1: 'DBG'
|
||||
, 2: 'VRB'
|
||||
, 3: 'INF'
|
||||
, 4: 'IMP'
|
||||
, 5: 'WRN'
|
||||
, 6: 'ERR'
|
||||
, 7: 'FTL'
|
||||
}
|
||||
this.styles = {
|
||||
1: 'grey'
|
||||
, 2: 'cyan'
|
||||
, 3: 'green'
|
||||
, 4: 'magenta'
|
||||
, 5: 'yellow'
|
||||
, 6: 'red'
|
||||
, 7: 'red'
|
||||
}
|
||||
this.localIdentifier = null
|
||||
events.EventEmitter.call(this)
|
||||
}
|
||||
|
||||
util.inherits(Log, events.EventEmitter)
|
||||
|
||||
Log.Entry = function(timestamp, priority, tag, pid, identifier, message) {
|
||||
this.timestamp = timestamp
|
||||
this.priority = priority
|
||||
|
@ -129,6 +129,7 @@ Log.prototype._name = function(priority) {
|
|||
return chalk[this.styles[priority]](this.names[priority])
|
||||
}
|
||||
|
||||
/* eslint no-console: 0 */
|
||||
Log.prototype._write = function(entry) {
|
||||
console.error(this._format(entry))
|
||||
this.emit('entry', entry)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue