# Basic layout

  • type - basic

Basic layout will output the timestamp, level, category, followed by the formatted log event data.

# Example

import {Logger} from "@tsed/logger";

const logger = new Logger("loggerName");

logger.appenders.set("std-log", {
  type: "stdout",
  layout: {type: "basic"},
  level: ["debug", "info", "trace"]
});
logger.debug("Log something");
1
2
3
4
5
6
7
8
9
10

This will output:

[2017-03-30 07:57:00.113] [DEBUG] [loggerName] - Log something
1

Last Updated: 8/23/2022, 6:24:43 PM

Other topics