{"id":41611,"library":"node-red-contrib-flogger","title":"Node-RED Contrib Flogger","description":"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.","status":"active","version":"1.2.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","node-red","flogger","logger","logging","logfile"],"install":[{"cmd":"npm install node-red-contrib-flogger","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-flogger","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-flogger","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Node-RED modules are CommonJS; ESM import is not supported.","wrong":"import flogger from 'node-red-contrib-flogger'","symbol":"Flogger","correct":"require('node-red-contrib-flogger')"},{"note":"Configuration is done via Node-RED's config nodes, not programmatically.","wrong":"Manual require() of config","symbol":"Flogger config node","correct":"Use the config-log node type as defined in the Node-RED palette"},{"note":"The property is 'loglevel', not 'level'.","wrong":"msg.level = 'DEBUG'","symbol":"Log level setting","correct":"msg.loglevel = 'DEBUG'"}],"quickstart":{"code":"// Flogger node configuration and usage example in Node-RED\n// Install: npm install node-red-contrib-flogger\n// After installation, restart Node-RED and add a Flogger node from the palette.\n// Configure a config-log node: name 'standard-logging', logdir 'logs', stamp 'utc', style 'plain', rotation true, compress true, count 5, size 10.\n// 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.\n// Deploy and inject a message. Check the 'logs' directory for logfile1.log.","lang":"javascript","description":"Shows the basic steps to set up Flogger: install, configure a log output, and log the full message."},"warnings":[{"fix":"Ensure your flow sets msg.loglevel only when intended, or leave undefined to use node default.","message":"Setting log level via msg.loglevel overrides the node's configured level; if not set, node's level is used.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use absolute paths if needed, or confirm the working directory.","message":"Log directory is relative to Node-RED's user directory, not the flow file's location.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Always verify that the config-log node is deployed and the 'logconfig' property points to it.","message":"If the config-log node is missing or misconfigured, Flogger will silently fail with no logs.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Parse logs as NDJSON (newline-delimited JSON) rather than expecting an array.","message":"When using JSON output style, the log file contains a JSON object per line, not an array.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Monitor disk usage; compressed logs accumulate in the log directory.","message":"Log rotation triggers based on file size; after rotation, the original file is compressed with .gz extension.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.2.2':56 'built':23 'built-in':22 'compress':44 'configur':31 'contrib':4 'debug':25,79 'differenti':63 'dynam':46 'file':17,50 'flogger':5,6,84 'flow':78 'format':33 'granular':14 'includ':64 'infrequ':60 'javascript':80 'json':37 'key':62 'level':48,69 'like':38 'log':18,40,47,68,73,86 'logfil':30,87 'logger':85 'messag':53,67 'mode':76 'modul':12 'multi':16 'multi-fil':15 'multipl':29 'mustach':71 'nlog':39 'node':2,10,82 'node-r':1,9,81 'option':43 'output':32 'overrid':70 'passthrough':75 'per':66 'per-messag':65 'plain':34 'properti':54 'red':3,11,83 'rotat':41 'select':51 'stabl':58 'support':28 'surpass':20 'templat':72 'text':35 'updat':61 'version':55 'via':52 'window':26","created_at":"2026-06-04T18:53:15.085715+00:00","updated_at":"2026-06-04T18:53:15.085715+00:00","problems":[{"fix":"Ensure the message has a payload property before the Flogger node, or set inputchoice to 'fullmsg' instead of 'moustache'.","cause":"Flogger node is receiving a message without a payload or with a non-string payload when expecting a string for Mustache template.","error":"TypeError: Cannot read property 'split' of undefined"},{"fix":"Double-click the Flogger node, select or create a config-log node in the 'Log Config' field, and deploy.","cause":"The Flogger node does not have a config-log node assigned in its 'logconfig' property.","error":"Error: logconfig not configured"},{"fix":"Create the 'logs' directory manually, or change the 'logdir' property in the config-log node to an existing absolute path.","cause":"The log directory (e.g., 'logs') does not exist relative to Node-RED's user directory.","error":"ENOENT: no such file or directory, open 'logs/logfile1.log'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"node-red-contrib-flogger","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}