Registry / devops / node-red-contrib-flogger

node-red-contrib-flogger

JSON →
library1.2.2jsnpmunverified

Flogger is a Node-RED module for granular, multi-file logging that surpasses the built-in debug window. It supports multiple logfiles, configurable output formats (plain text or JSON like NLOG), log rotation with optional compression, and dynamic log level and file selection via message properties. Version 1.2.2 is stable with infrequent updates. Key differentiators include per-message log level override, Mustache template logging, and passthrough mode for flow debugging.

npm install node-red-contrib-flogger
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-F
N
node-red-contrib-flogger
devopsjavascriptv1.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Flogger
require('node-red-contrib-flogger')
import flogger from 'node-red-contrib-flogger'
Node-RED modules are CommonJS; ESM import is not supported.
Flogger config node
Use the config-log node type as defined in the Node-RED palette
Manual require() of config
Configuration is done via Node-RED's config nodes, not programmatically.
Log level setting
msg.loglevel = 'DEBUG'
msg.level = 'DEBUG'
The property is 'loglevel', not 'level'.

Shows the basic steps to set up Flogger: install, configure a log output, and log the full message.

// Flogger node configuration and usage example in Node-RED // Install: npm install node-red-contrib-flogger // After installation, restart Node-RED and add a Flogger node from the palette. // Configure a config-log node: name 'standard-logging', logdir 'logs', stamp 'utc', style 'plain', rotation true, compress true, count 5, size 10. // Connect an inject node to a Flogger node. Set Flogger's logfile to 'logfile1', input choice to 'fullmsg', loglevel to 'INFO', and select the config-log node. // Deploy and inject a message. Check the 'logs' directory for logfile1.log.
Debug
Known issues
gotchaSetting log level via msg.loglevel overrides the node's configured level; if not set, node's level is used.
fix
Ensure your flow sets msg.loglevel only when intended, or leave undefined to use node default.
affects: >=1.0
gotchaLog directory is relative to Node-RED's user directory, not the flow file's location.
fix
Use absolute paths if needed, or confirm the working directory.
affects: >=1.0
gotchaIf the config-log node is missing or misconfigured, Flogger will silently fail with no logs.
fix
Always verify that the config-log node is deployed and the 'logconfig' property points to it.
affects: >=1.0
gotchaWhen using JSON output style, the log file contains a JSON object per line, not an array.
fix
Parse logs as NDJSON (newline-delimited JSON) rather than expecting an array.
affects: >=1.0
gotchaLog rotation triggers based on file size; after rotation, the original file is compressed with .gz extension.
fix
Monitor disk usage; compressed logs accumulate in the log directory.
affects: >=1.0
Errors
Common errors & fixes
TypeError: Cannot read property 'split' of undefined
Flogger node is receiving a message without a payload or with a non-string payload when expecting a string for Mustache template.
fix
Ensure the message has a payload property before the Flogger node, or set inputchoice to 'fullmsg' instead of 'moustache'.
Error: logconfig not configured
The Flogger node does not have a config-log node assigned in its 'logconfig' property.
fix
Double-click the Flogger node, select or create a config-log node in the 'Log Config' field, and deploy.
ENOENT: no such file or directory, open 'logs/logfile1.log'
The log directory (e.g., 'logs') does not exist relative to Node-RED's user directory.
fix
Create the 'logs' directory manually, or change the 'logdir' property in the config-log node to an existing absolute path.
Upgrade
Version history
1.2.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
node-red-contrib-flogger — npm install node-red-contrib-flogger · libregistry