Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return __awaiter(this, void 0, void 0, function* () {
var aLogger = T.Imperative.api.appLogger;
aLogger.debug(`Log message from test plugin: DEBUG: ${params.arguments.test}`);
aLogger.info(`Log message from test plugin: INFO: ${params.arguments.test}`);
aLogger.warn(`Log message from test plugin: WARN: ${params.arguments.test}`);
aLogger.error(`Log message from test plugin: ERROR: ${params.arguments.test}`);
var iLogger = T.Imperative.api.imperativeLogger;
iLogger.debug(`Log message from test plugin: DEBUG: ${params.arguments.test}`);
iLogger.info(`Log message from test plugin: INFO: ${params.arguments.test}`);
iLogger.warn(`Log message from test plugin: WARN: ${params.arguments.test}`);
iLogger.error(`Log message from test plugin: ERROR: ${params.arguments.test}`);
var config = T.ImperativeConfig.instance.loadedConfig;
params.response.console.log(`${params.arguments.test}: Messages logged successfully to the following locations`);
params.response.console.log(path.join(config.defaultHome, "imperative", "logs", "imperative.log"));
params.response.console.log(path.join(config.defaultHome, config.name, "logs", config.name + ".log"));
});
}
return __awaiter(this, void 0, void 0, function* () {
var iApi = T.Imperative.api;
if (iApi != null) {
params.response.console.log("Imperative APIs are accessible from the test plugin");
} else {
throw new T.ImperativeError({msg: "Imperative APIs are not accessible from the test plugin"});
}
if (iApi.imperativeLogger != null) {
params.response.console.log("Imperative APIs imperativeLogger is accessible from the test plugin");
} else {
throw new T.ImperativeError({msg: "Imperative APIs imperativeLogger is not accessible from the test plugin"});
}
if (iApi.appLogger != null) {
params.response.console.log("Imperative APIs appLogger is accessible from the test plugin");
} else {
return __awaiter(this, void 0, void 0, function* () {
var aLogger = T.Imperative.api.appLogger;
aLogger.debug(`Log message from test plugin: DEBUG: ${params.arguments.test}`);
aLogger.info(`Log message from test plugin: INFO: ${params.arguments.test}`);
aLogger.warn(`Log message from test plugin: WARN: ${params.arguments.test}`);
aLogger.error(`Log message from test plugin: ERROR: ${params.arguments.test}`);
var iLogger = T.Imperative.api.imperativeLogger;
iLogger.debug(`Log message from test plugin: DEBUG: ${params.arguments.test}`);
iLogger.info(`Log message from test plugin: INFO: ${params.arguments.test}`);
iLogger.warn(`Log message from test plugin: WARN: ${params.arguments.test}`);
iLogger.error(`Log message from test plugin: ERROR: ${params.arguments.test}`);
var config = T.ImperativeConfig.instance.loadedConfig;
params.response.console.log(`${params.arguments.test}: Messages logged successfully to the following locations`);
params.response.console.log(path.join(config.defaultHome, "imperative", "logs", "imperative.log"));
params.response.console.log(path.join(config.defaultHome, config.name, "logs", config.name + ".log"));
});