apitally
Version:
Simple API monitoring & analytics for REST APIs built with Express, Fastify, NestJS, AdonisJS, Hono, H3, Elysia, Hapi, and Koa.
17 lines • 592 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
import { createLogger, format, transports } from "winston";
function getLogger() {
return createLogger({
level: process.env.APITALLY_DEBUG ? "debug" : "warn",
format: format.combine(format.colorize(), format.timestamp(), format.printf((info) => `${info.timestamp} ${info.level}: ${info.message}`)),
transports: [
new transports.Console()
]
});
}
__name(getLogger, "getLogger");
export {
getLogger
};
//# sourceMappingURL=logging.js.map