logary
    TypeScript icon, indicating that this package has built-in type declarations

    6.0.0-beta.8 • Public • Published

    Logary JS 🦋

    A library for unified logging, metrics and tracing.

    npm add logary
    

    Usage

    See the ./examples folder. Here is an example with NextJS:

    import { RuttaTarget, getLogary, LogLevel, ConsoleTarget } from 'logary'
    import browser from '@logary/plugin-browser'
    import nextjs from '@logary/plugin-nextjs'
    import react from '@logary/plugin-react'
     
    const instance = getLogary({
      minLevel: LogLevel.debug,
      serviceName: 'with-nextjs',
      targets: [
        new ConsoleTarget(),
        new RuttaTarget({ endpoint: 'https://i.logary.tech' })
      ],
      accountId: 'open-source',
      debug: false
    })
     
    browser(instance)
    nextjs(instance)
    react(instance)
    // more plugins here
     
    export default instance

    API

    Logger

    Plain logging:

    • verbose
    • debug
    • info
    • warn
    • error

    Structured events:

    • event

    Users / UTM tags:

    • identify
    • setUserProperty

    Tracing:

    • getTracer

    Install

    npm i logary

    Homepage

    logary.tech

    DownloadsWeekly Downloads

    385

    Version

    6.0.0-beta.8

    License

    GPL-3.0 / commercial

    Unpacked Size

    93.3 kB

    Total Files

    99

    Last publish

    Collaborators

    • haf
    • leehog
    • rockbjornen