# Loggly Appender
Sends logging events to Loggly (opens new window), optionally adding tags. This appender uses node-loggly-bulk (opens new window). Consult the docs for node-loggly-bulk, or loggly itself, if you want more information on the configuration options below.
npm install --save @tsed/logger-loggly
1
# Configuration
type
-loggly
options.token
-string
- your really long input tokenoptions.subdomain
-string
- your subdomainoptions.auth
-object
(optional) - authentication detailsusername
-string
password
-string
options.tags
-Array<string>
(optional) - tags to include in every log message
See all available options for Loggly here (opens new window).
# Example
import {Logger} from "@tsed/logger";
import "@tsed/logger-loggly";
const logger = new Logger("loggerName");
logger.appenders.set("stdout", {
type: "loggly",
level: ["info"],
options: {
token: "somethinglong",
subdomain: "your.subdomain",
tags: ["tag1"]
}
});
logger.info({tags: ["my-tag-1", "my-tag-2"]}, "Some message");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
This will result in a log message being sent to loggly with the tags tag1
, my-tag-1
, my-tag-2
.
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