UNPKG

@tsed/logger

Version:
25 lines 927 B
import { __decorate } from "tslib"; import { BaseLayout } from "../class/BaseLayout.js"; import { Layout } from "../decorators/layout.js"; import { StringUtils } from "../utils/StringUtils.js"; import { timestampLevelAndCategory } from "../utils/timestampLevelAndCategory.js"; let BasicLayout = class BasicLayout extends BaseLayout { /** * BasicLayout is a simple layouts for storing the logs. The logs are stored * in following format: * <pre> * [startTime] [logLevel] categoryName - message\n * </pre> * * @author Stephan Strittmatter */ transform(loggingEvent, timezoneOffset) { return (timestampLevelAndCategory(loggingEvent, undefined, timezoneOffset) + StringUtils.format(...[].concat(loggingEvent.data))); } }; BasicLayout = __decorate([ Layout({ name: "basic" }) ], BasicLayout); export { BasicLayout }; //# sourceMappingURL=BasicLayout.js.map