@balena/jellyfish-logger
TypeScript icon, indicating that this package has built-in type declarations

6.0.10 • Public • Published

Jellyfish Logger

The Jellyfish backend strongly discourages the use of console.log(). This module provides a set of functions that the backend uses for logging purposes.

Goals

  • The logger takes a request ID parameter to easily filter down logs that correspond to a single system request
  • The logger is able to log uncaught exceptions
  • The logger is able to send logs using different priority levels
  • The logger is able to preserve rich object logs
  • The logger is able to pipe logs to a central location when running in production

Usage

Below is an example how to use this library:

const logger = require('@balena/jellyfish-logger')

logger.warn(context, 'Inserting card', {
    slug: card.slug,
    type: card.type
})

/@balena/jellyfish-logger/

    Package Sidebar

    Install

    npm i @balena/jellyfish-logger

    Weekly Downloads

    1

    Version

    6.0.10

    License

    Apache-2.0

    Unpacked Size

    24.4 kB

    Total Files

    6

    Last publish

    Collaborators

    • dfunckt
    • page
    • balena.io