![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/local/lib/node_modules/forever/node_modules/winston/lib/winston/ |
Upload File : |
/* * config.js: Default settings for all levels that winston knows about * * (C) 2010 Charlie Robbins * MIT LICENCE * */ var colors = require('colors'); var config = exports, allColors = exports.allColors = {}; config.addColors = function (colors) { mixin(allColors, colors); }; config.colorize = function (level) { var colorized = level; if (allColors[level] instanceof Array) { for (var i = 0, l = allColors[level].length; i < l; ++i) { colorized = colorized[allColors[level][i]]; } } else if (allColors[level].match(/\s/)) { var colorArr = allColors[level].split(/\s+/); for (var i = 0; i < colorArr.length; ++i) { colorized = colorized[colorArr[i]]; } allColors[level] = colorArr; } else { colorized = colorized[allColors[level]]; } return colorized; }; // // Export config sets // config.cli = require('./config/cli-config'); config.npm = require('./config/npm-config'); config.syslog = require('./config/syslog-config'); // // Add colors for pre-defined config sets // config.addColors(config.cli.colors); config.addColors(config.npm.colors); config.addColors(config.syslog.colors); function mixin (target) { var args = Array.prototype.slice.call(arguments, 1); args.forEach(function (a) { var keys = Object.keys(a); for (var i = 0; i < keys.length; i++) { target[keys[i]] = a[keys[i]]; } }); return target; };