Showing 6 of 10 total issues
Function LoggingEnhancer
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var LoggingEnhancer = function(sprintf, moment) {
var self = this;
this.LEVEL = { TRACE: 4, DEBUG: 3, INFO: 2, WARN: 1, ERROR: 0, OFF: -1 };
Function enhanceLogging
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.enhanceLogging = function(loggingFunc, level, context, config, datetimePattern, datetimeLocale, prefixPattern) {
config.logLevels = config.logLevels || [];
return function() {
if (levelPassesThreshold(context, level, config)) {
var enhancedArguments = enhanceLogline(arguments, context, level, datetimePattern, datetimeLocale, prefixPattern);
File logging-enhancer-spec.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global describe, beforeEach, expect, it*/
var counters = {};
var OFF = '-1', TRACE = '0', DEBUG = '1', LOG = '2', INFO = '3', WARN = '4', ERROR = '5';
var dummy = {
Function enhanceLogging
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
this.enhanceLogging = function(loggingFunc, level, context, config, datetimePattern, datetimeLocale, prefixPattern) {
Function enhanceLogline
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function enhanceLogline(args, context, level, datetimePattern, datetimeLocale, prefixPattern) {
Function generatePrefix
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function generatePrefix(context, level, datetimePattern, datetimeLocale, prefixPattern) {