@livy/tags-processor
v1.0.4
Published
Adds tags to a Livy log record
Maintainers
Readme
@livy/tag-processor
This Livy processor adds predefined tags to a log record's extra object.
Runtime: Node.js and browsers
Basic Example
const { createLogger } = require('@livy/logger')
const { TagsProcessor } = require('@livy/tag-processor')
const logger = createLogger('app-logger', {
processors: [
// Adds `tags: ['demo', 'docs']` to the `extra` object
new TagsProcessor('demo', 'docs')
]
})Installation
Install it via npm:
npm install @livy/tag-processorOptions
The TagsProcessor constructor takes an arbitrary number of strings to inject as tags.
Public API
addTags(...tags)
Add tags to the processor. Duplicates will be removed.
setTags(...tags)
Set the processor's tags.
