Node Packaged Masterfully

    @shelf/winston-datadog-logs-transport

    2.0.1 • Public • Published

    winston-datadog-logs-transport

    Winston transport for Datadog Logs (not events)

    There are 3 winston transports for Datadog on NPM: 1, 2, 3.

    All of them send data to Datadog Events instead of Datadog Logs. This package actually is a transport for Datadog Logs, not Events.

    Install

    $ yarn add @shelf/winston-datadog-logs-transport
    

    Usage

    import winston from 'winston';
    import DatadogTransport from '@shelf/winston-datadog-logs-transport';
    
    const logger = winston.createLogger({
      transports: [
        new DatadogTransport({
          apiKey: process.env.DD_API_KEY, // Datadog API key
          port: 443, // optional port, 443 is for EU region secure port
          host: 'tcp-intake.logs.datadoghq.eu', // optinal host, 'tcp-intake.logs.datadoghq.eu' is for EU region host
          // optional metadata which will be merged with every log message
          metadata: {
            ddsource: 'lambda',
            environment: 'prod'
          }
        })
      ]
    });
    
    logger.info('Hey there', {thisIsMy: 'metadata'});

    Publish

    $ git checkout master
    $ yarn version
    $ yarn publish
    $ git push origin master --tags

    License

    MIT © Shelf

    Install

    npm i @shelf/winston-datadog-logs-transport

    DownloadsWeekly Downloads

    7,332

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    5.39 kB

    Total Files

    5

    Last publish

    Collaborators

    • anastasiash
    • kchlon
    • dmytro.harazdovskiy
    • duch0416
    • i5adovyi
    • olesiamuller
    • mykola.khytra
    • yuliiakovalchuk
    • el_scrambone
    • bodyaflesh
    • slavammellnikov
    • andrii-nastenko
    • andriisermiahin
    • arkadii007
    • mpushkin
    • batovpavlo
    • vasylhoban
    • andrew214
    • domovoj
    • vozemer
    • oleksii.dymnich
    • set001
    • bogdan.kyba
    • dima-bond
    • maksym.hayovets
    • oles.zadorozhnyy
    • ss1l
    • gemshelf
    • d-mii-
    • hartzler
    • tarasdyksan
    • andrii_butsa
    • nazarko_suv
    • bogdan.kolesnyk
    • vitaliishcherban
    • vladgolubev
    • marianna-milovanova
    • hmelenok
    • knupman
    • maaraanas
    • terret
    • chapelskyi.slavik
    • pihorb
    • irynah
    • diana.kryskuv
    • andy.raven
    • rafler
    • mykola.chepkyi
    • sskalp88
    • demiansua
    • yuriil
    • ktv18
    • drews_abuse
    • rostyslav-horytskyi
    • whodeen