3.1.0 • Published 8 months ago
@loglayer/transport-datadog v3.1.0
Datadog Transport for LogLayer
The DataDog transport for the LogLayer logging library.
Ships logs to DataDog using the datadog-transport-common library.
Important Notes
- Only works server-side (not in browsers)
- For browser-side logging, use the
@loglayer/transport-datadog-browser-logspackage
- For browser-side logging, use the
- You will not get any console output since this sends directly to DataDog. Use the
onDebugoption to log out messages.
Installation
npm install loglayer @loglayer/transport-datadog serialize-errorUsage
import { LogLayer } from 'loglayer'
import { DataDogTransport } from "@loglayer/transport-datadog"
import { serializeError } from "serialize-error";
const log = new LogLayer({
errorSerializer: serializeError,
transport: new DataDogTransport({
options: {
ddClientConf: {
authMethods: {
apiKeyAuth: "YOUR_API_KEY",
},
},
ddServerConf: {
// Note: This must match the site you use for your DataDog login - See below for more info
site: "datadoghq.eu"
},
onDebug: (msg) => {
console.log(msg);
},
onError: (err, logs) => {
console.error(err, logs);
},
},
})
})See the documentation for more information.
3.1.0
8 months ago
3.0.4
10 months ago
3.0.3
11 months ago
3.0.2
11 months ago
3.0.1
11 months ago
3.0.0
11 months ago
2.0.11
11 months ago
2.0.10
12 months ago
2.0.9
12 months ago
2.0.8
12 months ago
2.0.7
1 year ago
2.0.6
1 year ago
2.0.5
1 year ago
2.0.4
1 year ago
2.0.3
1 year ago
2.0.2
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago