1.0.4 • Published 3 years ago
@livy/memory-usage-processor v1.0.4
@livy/memory-usage-processor
This Livy processor injects current memory usage into a log record's extra object.
Runtime: Node.js
Basic Example
const { createLogger } = require('@livy/logger')
const { MemoryUsageProcessor } = require('@livy/memory-usage-processor')
const logger = createLogger('app-logger', {
processors: [new MemoryUsageProcessor()]
})Installation
Install it via npm:
npm install @livy/memory-usage-processorOptions
The MemoryUsageProcessor constructor takes an optional boolean humanReadable parameter (which defaults to true). It formats memory usage in a human readable way. Turn it off to inject the raw number of bytes.