@eclipse-glsp-examples/workflow-server-bundled 2.4.0-next.119 → 2.4.0-next.121
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/package.json +2 -2
- package/wf-glsp-server-node.js +28 -20
- package/wf-glsp-server-node.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server-bundled",
|
|
3
|
-
"version": "2.4.0-next.
|
|
3
|
+
"version": "2.4.0-next.121+35d8055",
|
|
4
4
|
"description": "GLSP node server for the workflow example (bundled)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "35d805558ea1c8e40ec0b59d5144e41210b55038"
|
|
53
53
|
}
|
package/wf-glsp-server-node.js
CHANGED
|
@@ -66997,42 +66997,45 @@ let ConsoleLogger = class ConsoleLogger extends logger_1.Logger {
|
|
|
66997
66997
|
}
|
|
66998
66998
|
info(message, ...params) {
|
|
66999
66999
|
if (logger_1.LogLevel.info <= this.logLevel) {
|
|
67000
|
-
console.info(this.logMessage(message, params));
|
|
67000
|
+
console.info(this.logMessage(logger_1.LogLevel.info, message, ...params));
|
|
67001
67001
|
}
|
|
67002
67002
|
}
|
|
67003
67003
|
warn(message, ...params) {
|
|
67004
67004
|
if (logger_1.LogLevel.warn <= this.logLevel) {
|
|
67005
|
-
console.warn(this.logMessage(message, params));
|
|
67005
|
+
console.warn(this.logMessage(logger_1.LogLevel.warn, message, ...params));
|
|
67006
67006
|
}
|
|
67007
67007
|
}
|
|
67008
67008
|
error(message, ...params) {
|
|
67009
67009
|
if (logger_1.LogLevel.error <= this.logLevel) {
|
|
67010
|
-
console.error(this.logMessage(message, params));
|
|
67010
|
+
console.error(this.logMessage(logger_1.LogLevel.error, message, ...params));
|
|
67011
67011
|
}
|
|
67012
67012
|
}
|
|
67013
67013
|
debug(message, ...params) {
|
|
67014
67014
|
if (logger_1.LogLevel.debug <= this.logLevel) {
|
|
67015
|
-
console.debug(this.logMessage(message, params));
|
|
67015
|
+
console.debug(this.logMessage(logger_1.LogLevel.debug, message, ...params));
|
|
67016
67016
|
}
|
|
67017
67017
|
}
|
|
67018
|
-
logMessage(message, ...params) {
|
|
67019
|
-
|
|
67020
|
-
|
|
67021
|
-
|
|
67022
|
-
return
|
|
67018
|
+
logMessage(level, message, ...params) {
|
|
67019
|
+
return `${this.logTimestamp()} ${(0, logger_1.asLogLevel)(level)} - ${this.logCaller()} ${message} ${this.logAdditionals(...params)}`;
|
|
67020
|
+
}
|
|
67021
|
+
logCaller() {
|
|
67022
|
+
return this.caller ? `[${this.caller}]` : '';
|
|
67023
|
+
}
|
|
67024
|
+
logTimestamp() {
|
|
67025
|
+
return new Date().toLocaleTimeString();
|
|
67023
67026
|
}
|
|
67024
67027
|
logAdditionals(...params) {
|
|
67025
|
-
|
|
67026
|
-
|
|
67027
|
-
|
|
67028
|
-
return
|
|
67028
|
+
return !params || params.length === 0 ? '' : params.map(param => this.stringify(param)).join(this.logAdditionalsSeparator());
|
|
67029
|
+
}
|
|
67030
|
+
logAdditionalsSeparator() {
|
|
67031
|
+
return ',\n';
|
|
67029
67032
|
}
|
|
67030
67033
|
stringify(param) {
|
|
67031
|
-
|
|
67032
|
-
|
|
67033
|
-
|
|
67034
|
-
}
|
|
67035
|
-
|
|
67034
|
+
return param instanceof Error ? this.stringifyError(param) : JSON.stringify(param, undefined, 4);
|
|
67035
|
+
}
|
|
67036
|
+
stringifyError(error) {
|
|
67037
|
+
return `${error.message}
|
|
67038
|
+
${error.stack || ''}`;
|
|
67036
67039
|
}
|
|
67037
67040
|
};
|
|
67038
67041
|
exports.ConsoleLogger = ConsoleLogger;
|
|
@@ -67822,7 +67825,6 @@ exports.createWinstonInstance = createWinstonInstance;
|
|
|
67822
67825
|
* @param baseLoggerCreator The underling global {@link winston.Logger} instance.
|
|
67823
67826
|
*/
|
|
67824
67827
|
function configureWinstonLogger(context, options, rebind = true, baseLoggerCreator = createWinstonInstance) {
|
|
67825
|
-
const baseLogger = baseLoggerCreator(options);
|
|
67826
67828
|
if (rebind) {
|
|
67827
67829
|
if (context.isBound(common_1.Logger)) {
|
|
67828
67830
|
context.unbind(common_1.Logger);
|
|
@@ -67831,12 +67833,18 @@ function configureWinstonLogger(context, options, rebind = true, baseLoggerCreat
|
|
|
67831
67833
|
context.unbind(common_1.LoggerFactory);
|
|
67832
67834
|
}
|
|
67833
67835
|
}
|
|
67834
|
-
context.bind(common_1.Logger).toDynamicValue(dynamicContext => new winston_logger_1.WinstonLogger(baseLogger, (0, common_1.getRequestParentName)(dynamicContext)));
|
|
67835
67836
|
context.bind(common_1.LoggerFactory).toFactory(dynamicContext => (caller) => {
|
|
67836
67837
|
const logger = dynamicContext.container.get(common_1.Logger);
|
|
67837
67838
|
logger.caller = caller;
|
|
67838
67839
|
return logger;
|
|
67839
67840
|
});
|
|
67841
|
+
// if no logging is enabled, bind the NullLogger
|
|
67842
|
+
if (!options.consoleLog && !options.fileLog) {
|
|
67843
|
+
context.bind(common_1.Logger).to(common_1.NullLogger).inSingletonScope();
|
|
67844
|
+
return;
|
|
67845
|
+
}
|
|
67846
|
+
const baseLogger = baseLoggerCreator(options);
|
|
67847
|
+
context.bind(common_1.Logger).toDynamicValue(dynamicContext => new winston_logger_1.WinstonLogger(baseLogger, (0, common_1.getRequestParentName)(dynamicContext)));
|
|
67840
67848
|
}
|
|
67841
67849
|
exports.configureWinstonLogger = configureWinstonLogger;
|
|
67842
67850
|
|