# Object layout

  • type - object

# Example

import {$log} from "@tsed/logger";
import "@tsed/logger-connect";
import {myLogger} from "./MyLogger";

$log.clear()
$log.appenders.set("std-log-json", {
  type: "connect",
  options: {
    logger: myLogger // should implements .info/debug/trace/warn/error/fatal
  }
});

$log.info("this is just a test");
$log.error("of a custom appender");
$log.warn("that outputs json");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

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

Other topics