1.0.8 • Published 3 years ago

@frozenmountain/liveswitch-datadog v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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);