zeddemore-logger 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ZeddemoreLogger.js +5 -5
- package/lib/color.js +1 -0
- package/package.json +1 -1
package/lib/ZeddemoreLogger.js
CHANGED
|
@@ -7,7 +7,7 @@ const morgan = require('morgan');
|
|
|
7
7
|
const winston = require('winston');
|
|
8
8
|
|
|
9
9
|
const { areHeadersSent, isResponseFailure, isResponseSuccessful } = require('./response');
|
|
10
|
-
const { chalkHttpStatuses, chalkHttpVerbs, chalkLdapOperation, chalkLdapStatuses, chalkLogLevel, chalkPackage,
|
|
10
|
+
const { chalkHex, chalkHttpStatuses, chalkHttpVerbs, chalkLdapOperation, chalkLdapStatuses, chalkLogLevel, chalkPackage,
|
|
11
11
|
chalkTarget, stripChalk } = require('./color');
|
|
12
12
|
const { convertBytes, objectBytes } = require('./math');
|
|
13
13
|
const { convertMilliseconds, durationConverted } = require('./date');
|
|
@@ -25,9 +25,9 @@ const ZeddemoreBase = require('./ZeddemoreBase');
|
|
|
25
25
|
const ZeddemoreLoggerController = require('./ZeddemoreLoggerController');
|
|
26
26
|
|
|
27
27
|
const { createLogger: createWinstonLogger, format: winstonFormat, Logform: Format, transports } = winston;
|
|
28
|
-
const { hexColors: hc, httpMethods: http, httpRequestHeaders: rqh, httpResponseHeaders: rsh,
|
|
29
|
-
morganFormats: mf, morganFormatTokens: mft, winstonFormats: wf, winstonLogLevelNames: wlln,
|
|
30
|
-
winstonTransports: wt } = enums;
|
|
28
|
+
const { chalkLayers: cl, hexColors: hc, httpMethods: http, httpRequestHeaders: rqh, httpResponseHeaders: rsh,
|
|
29
|
+
logLevelTypes: llt, morganFormats: mf, morganFormatTokens: mft, winstonFormats: wf, winstonLogLevelNames: wlln,
|
|
30
|
+
winstonLogLevels: wll, winstonTransports: wt } = enums;
|
|
31
31
|
|
|
32
32
|
class ZeddemoreLogger extends ZeddemoreBase {
|
|
33
33
|
|
|
@@ -777,7 +777,7 @@ class ZeddemoreLogger extends ZeddemoreBase {
|
|
|
777
777
|
if (serverEnvironment) serverParts.push(chalk.bold(serverEnvironment));
|
|
778
778
|
if (serverInstance) serverParts.push(serverInstance);
|
|
779
779
|
msgParts.push(`[${ serverParts.join(':') }]`);
|
|
780
|
-
msgParts.push(
|
|
780
|
+
msgParts.push(`${ chalkHex(hc.PACKAGE_NODE_JS, cl.FOREGROUND, 'Node.js') } server listening on ${ serverAddress }:${ chalk.bold(serverPort) }`);
|
|
781
781
|
msgParts.push(`(${ serverFamily })`);
|
|
782
782
|
this.log(logLevel)(msgParts.join(' '));
|
|
783
783
|
}
|
package/lib/color.js
CHANGED