Nine Pedestrians Mesmerized

    winston-datadog-browser
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.6 • Public • Published

    winston-datadog-browser

    npm npm bundle size NPM npm GitHub issues semantic-release: angular

    Send winston logs from the browser to Datadog via the datadog browser logs SDK.

    winston-transport + @datadog/browser-logs

    Installation

    npm install --save winston winston-datadog-browser

    Usage

    import { configure, format } from 'winston';
    import { DatadogBrowserLogs } from 'winston-datadog-browser';
    
    configure({
      transports: [
        new DatadogBrowserLogs({
          clientToken: '<DATADOG_CLIENT_TOKEN>',
          site: '<DATADOG_SITE>',
          forwardErrorsToLogs: true,
          sampleRate: 100,
        }),
        // Optionally, also log to browser console
        new BrowserConsole({
          format: format.simple(),
        }),
      ],
    });

    Configuration

    DatadogBrowserLogs uses the same configuration interface as @datadog/browser-logs. See the datadog initialization parameters for more details.

    Install

    npm i winston-datadog-browser

    DownloadsWeekly Downloads

    3

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    6.69 kB

    Total Files

    7

    Last publish

    Collaborators

    • manbearwiz