How to use the @node-red/util/lib/log.trace function in @node-red/util

To help you get started, we’ve selected a few @node-red/util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NGRP / node-red-contrib-viseo / node-red-viseo-storage-plugin / settings.js View on Github external
let settings = {};

            try {
                let data = await fs.readFile(globalSettingsFile,'utf8')
                settings = util.parseJSON(data);
            } catch(err) {
                log.trace("Corrupted global config detected - resetting");
            }

            let nodesSettings = {};

            try {
                data = await fs.readFile(projectSettingsFile, 'utf8');
                nodesSettings = util.parseJSON(data);
            } catch(err) {
                log.trace("Corrupted project config detected - resetting");
            }
                
            Object.assign(settings, nodesSettings);

            return resolve(settings);
        
        })
    },
github NGRP / node-red-contrib-viseo / node-red-viseo-storage-plugin / settings.js View on Github external
return when.promise(async function(resolve,reject) {

            let settings = {};

            try {
                let data = await fs.readFile(globalSettingsFile,'utf8')
                settings = util.parseJSON(data);
            } catch(err) {
                log.trace("Corrupted global config detected - resetting");
            }

            let nodesSettings = {};

            try {
                data = await fs.readFile(projectSettingsFile, 'utf8');
                nodesSettings = util.parseJSON(data);
            } catch(err) {
                log.trace("Corrupted project config detected - resetting");
            }
                
            Object.assign(settings, nodesSettings);

            return resolve(settings);
        
        })
github NGRP / node-red-contrib-viseo / node-red-viseo-storage-plugin / sessions.js View on Github external
fs.readFile(sessionsFile,'utf8',function(err,data){
                if (!err) {
                    try {
                        return resolve(util.parseJSON(data));
                    } catch(err2) {
                        log.trace("Corrupted sessions file - resetting");
                    }
                }
                resolve({});
            })
        });