mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Rename "roles" to "units". Put units in their own folders.
This commit is contained in:
parent
7d9d64ddcb
commit
3a9b193f68
63 changed files with 105 additions and 105 deletions
27
lib/units/device/plugins/logger.js
Normal file
27
lib/units/device/plugins/logger.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
var syrup = require('syrup')
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
var wire = require('../../../wire')
|
||||
var wireutil = require('../../../wire/util')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('../support/push'))
|
||||
.define(function(options, push) {
|
||||
// Forward all logs
|
||||
logger.on('entry', function(entry) {
|
||||
push.send([
|
||||
wireutil.global
|
||||
, wireutil.envelope(new wire.DeviceLogMessage(
|
||||
options.serial
|
||||
, entry.timestamp / 1000
|
||||
, entry.priority
|
||||
, entry.tag
|
||||
, entry.pid
|
||||
, entry.message
|
||||
, entry.identifier
|
||||
))
|
||||
])
|
||||
})
|
||||
|
||||
return logger
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue