liveswitch-datadog

A simple log provider that uses datadog as a target for LiveSwitch logging.

https://docs.datadoghq.com/logs/log_collection/javascript/

This package depends on the package provided by DataDog. You don't have to include this in your app, it's already referenced by this package:

import { datadogLogs } from '@datadog/browser-logs'

Install the package:

npm install @frozenmountain/liveswitch-datadog

Import the package:

import { DataDogLogProvider } from '@frozenmountain/liveswitch-datadog'

Use the package:

var provider = new DataDogLogProvider({
    clientToken: '- put your client token here -',
    service: '- put your app name here -',
    site: 'datadoghq.com',
    forwardErrorsToLogs: true,
    sampleRate: 100,
    email: '- email address for tracking who created the log -',
    logLevel: fm.liveswitch.LogLevel.Info
})
fm.liveswitch.Log.registerProvider(provider);

npm package