# StderrAppender Class private

Module
import { StderrAppender } from "@tsed/logger"
Source/packages/logger/src/appenders/components/StderrAppender.ts

# Overview

class StderrAppender extends BaseAppender {
<span class="token function">write</span><span class="token punctuation">(</span>loggingEvent<span class="token punctuation">:</span> <a href="/api/logger/core/LogEvent.html"><span class="token">LogEvent</span></a><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>

}

# Description

# Standard Error Appender

This appender writes all log events to the standard error stream.

# Configuration

  • type - stderr
  • layout - object (optional, defaults to colouredLayout) - see layouts

# Example

import {Logger} from "ts-log-debug";

const logger = new Logger("loggerName");

logger.appenders.set("log-error", {
    type: "stderr",
    levels: ["error", "warn", "fatal"]
});
1
2
3
4
5
6
7
8

# Members

write(loggingEvent: LogEvent): void;

Other topics