better-js-logging/better-logging-base

View on GitHub

Showing 6 of 10 total issues

Function LoggingEnhancer has 86 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var LoggingEnhancer = function(sprintf, moment) {
        var self = this;

        this.LEVEL = { TRACE: 4, DEBUG: 3, INFO: 2, WARN: 1, ERROR: 0, OFF: -1 };

Severity: Major
Found in src/logging-enhancer.js - About 3 hrs to fix

    Function enhanceLogging has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    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);
    Severity: Major
    Found in src/logging-enhancer.js - About 2 hrs to fix

      File logging-enhancer-spec.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
      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 = {
      Severity: Minor
      Found in spec/logging-enhancer-spec.js - About 2 hrs to fix

        Function enhanceLogging has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                this.enhanceLogging = function(loggingFunc, level, context, config, datetimePattern, datetimeLocale, prefixPattern) {
        Severity: Major
        Found in src/logging-enhancer.js - About 50 mins to fix

          Function enhanceLogline has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                      function enhanceLogline(args, context, level, datetimePattern, datetimeLocale, prefixPattern) {
          Severity: Minor
          Found in src/logging-enhancer.js - About 45 mins to fix

            Function generatePrefix has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        function generatePrefix(context, level, datetimePattern, datetimeLocale, prefixPattern) {
            Severity: Minor
            Found in src/logging-enhancer.js - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language