}); } catch (err) { logger.debug(err); res.status(500).end();
const Logger = (scope: string) => { const scopeDebug = Debug(scope); return { debug(message: string, ...args: any[]) { if (configs.production) { logger.debug(format(scope, message), parse(args)); } scopeDebug(message, parse(args)); }, verbose: (message: string, ...args: any[]) => logger.verbose(format(scope, message), parse(args)), silly: (message: string, ...args: any[]) => logger.silly(format(scope, message), parse(args)), info: (message: string, ...args: any[]) => logger.info(format(scope, message), parse(args)), warn: (message: string, ...args: any[]) => logger.warn(format(scope, message), parse(args)), error: (message: string, ...args: any[]) => logger.error(format(scope, message), parse(args)), }; }
/** * 构建 */ async build() { this.api.logger.debug("DatabasePlugin: build", this.resolvedInputs); }
// GET -> return json format app.get('/health', (req, res) => { logger.debug('GET' + req.url); let health = { status: 'Up', startTime: START_TIME, version: packageJson.version, } res.setHeader('Content-Type', 'application/json'); res.status(200) res.send(JSON.stringify(health, null, '\t')) })
createRequest(method, path) { const urlPath = common.getTreatedValue(path); this.options = { ...this.options, method, url: urlPath, }; logger.debug(`User creates the [${method}] request to [${path}]`); }
var _getStreamClient = function() { Logger.log.debug('Getting new Kinesis stream client for region: ' + _config.kinesis_region); _stream = new Aws.Kinesis({region: _config.kinesis_region}); }
/** * 初始化 */ async init() { this.api.logger.debug("NuxtPlugin: init", this.resolvedInputs); const { installCommand } = this.resolvedInputs; if (fs.existsSync("package.json")) { this.api.logger.info(installCommand); return promisify(exec)(installCommand); } }
/** * 初始化 */ async init() { this.api.logger.debug("NextPlugin: init", this.resolvedInputs); if (fs.existsSync("package.json")) { this.api.logger.info("npm install"); return promisify(exec)("npm install"); } }
/** * 将资源编译成 SAM 描述 */ async compile() { this.api.logger.debug("DenoPlugin: compile", this.resolvedInputs); return this.containerPlugin.compile(); }
/** * 部署 */ async deploy() { this.api.logger.debug( "ContainerPlugin: deploy", this.resolvedInputs, this.buildOutput ); }
}); } catch (err) { logger.debug(err); res.status(500).end();
const Logger = (scope: string) => { const scopeDebug = Debug(scope); return { debug(message: string, ...args: any[]) { if (configs.production) { logger.debug(format(scope, message), parse(args)); } scopeDebug(message, parse(args)); }, verbose: (message: string, ...args: any[]) => logger.verbose(format(scope, message), parse(args)), silly: (message: string, ...args: any[]) => logger.silly(format(scope, message), parse(args)), info: (message: string, ...args: any[]) => logger.info(format(scope, message), parse(args)), warn: (message: string, ...args: any[]) => logger.warn(format(scope, message), parse(args)), error: (message: string, ...args: any[]) => logger.error(format(scope, message), parse(args)), }; }
/** * 初始化资源 */ async init() { this.api.logger.debug("DenoPlugin: init", this.resolvedInputs); }
/** * 初始化 */ async init() { this.api.logger.debug("ContainerPlugin: init", this.resolvedInputs); }
/** * 初始化 */ async init() { this.api.logger.debug("FunctionPlugin: init", this.resolvedInputs); }