UNPKG

@nimbella/postman-api

Version:

Postman Collection to Nimbella Project: Take your APIs seamlessly into Serverless world with this API

30 lines (29 loc) 1.36 kB
"use strict"; /* * Copyright (c) 2019 - present Nimbella Corp. * * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); const winston_1 = require("winston"); const path = require("path"); const logCombined = path.join(__dirname, 'logs', 'errors.log'); const logError = path.join(__dirname, 'logs', 'combined.log'); const logger = winston_1.createLogger({ level: 'info', format: winston_1.format.combine(winston_1.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss', }), winston_1.format.errors({ stack: true }), winston_1.format.splat(), winston_1.format.json()), transports: [ new winston_1.transports.File({ filename: logError, level: 'error' }), new winston_1.transports.File({ filename: logCombined }), ], }); exports.default = logger;