# Appenders
Appenders serialise log events to some form of output. They can write to files, send emails, send data over the network. All appenders have a type which determines which appender gets used. For example:
# Example
import {Logger} from "@tsed/logger";
const logger = new Logger("loggerName");
logger.appenders
.set({
type: "stdout",
level: ["debug", "info", "trace"]
})
.set({
type: "stderr",
level: ["error", "fatal", "warn"]
})
.set({
type: "file",
filename: "logfile.log"
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
TIP
This example defines three appenders named stdout
, stderr
and file
.
# Core Appenders
The following appenders are included with Ts.Logger.
Loading in progress...
Last Updated: 10/26/2023, 6:30:07 AM
Other topics
- Console Appender
- File Appender
- Date Rolling File Appender
- Connect Appender
- Standard Out Appender
- Standard Error Appender
- Insight Appender
- LogEntries Appender
- LogStash HTTP Appender
- LogStash UDP Appender
- Loggly Appender
- RabbitMQ Appender
- Seq Appender
- Slack Appender
- SMTP Appender
- Basic layout
- Colored layout
- Dummy layout
- Message Pass-Through layout
- Object layout
- Json layout
- Pattern layout