JavaScript Quickstart

Reading time: 3 minutes

Install the package

The first step is to install the Logary package from npm.

yarn add logary @logary/plugin-browser @logary/plugin-nextjs @logary/plugin-node @logary/plugin-react or with npm:npm add logary @logary/plugin-browser @logary/plugin-nextjs @logary/plugin-node @logary/plugin-react.

Remove the ones that are irrelevant for you.

How to use


        import { info } from 'logary'
        info("Hello world")
        

You can spawn Rutta server-side as a docker container, to ingest logs:

$ docker run -p 10001:10001 --rm -it haaf/rutta router --listener http 0.0.0.0:10001 json --target console://./

You can choose between the different targets when forwarding the logs (see the main logary repo)