eggjs / egg-logger
Showing 2 of 6 files from the diff.

@@ -98,7 +98,13 @@
Loading
98 98
      meta.pid = process.pid;
99 99
      meta.hostname = hostname;
100 100
      meta.message = message;
101 -
      output = options.json === true ? JSON.stringify(meta) : formatter(meta);
101 +
      if (options.json === true) {
102 +
        const outputMeta = { ...meta };
103 +
        outputMeta.ctx = undefined;
104 +
        output = JSON.stringify(outputMeta);
105 +
      } else {
106 +
        output = formatter(meta);
107 +
      }
102 108
    } else {
103 109
      output = message;
104 110
    }

@@ -44,11 +44,8 @@
Loading
44 44
    const meta = {
45 45
      formatter: contextFormatter,
46 46
      paddingMessage: this.paddingMessage,
47 +
      ctx: this.ctx,
47 48
    };
48 -
    Object.defineProperty(meta, 'ctx', {
49 -
      enumerable: false,
50 -
      value: this.ctx,
51 -
    });
52 49
    this._logger.log(LEVEL, arguments, meta);
53 50
  };
54 51
});
Files Coverage
lib 97.29%
index.js 100.00%
Project Totals (14 files) 97.37%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading