StdoutAppender
@tsed/logger
Usage
typescript
import { StdoutAppender } from "@tsed/logger";
See /packages/logger/src/types/node/appenders/StdoutAppender.ts.
Overview
ts
class StdoutAppender extends BaseAppender {
write(loggingEvent: LogEvent): void;
}
Description
Standard Output Appender
This appender writes all log events to the standard output stream.
Configuration
- type - stderr
- layout - object (optional, defaults to colouredLayout) - see layouts
Example
typescript
import {Logger} from "@tsed/logger";
const logger = new Logger("loggerName");
logger.appenders.set("log", {
type: "stdout",
levels: ["info", "trace", "debug"]
});
write
ts
write(loggingEvent: LogEvent): void;