@superlogica/super-log-js
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

Super Log JS

Super Log JS

What is Super Log?

Lib JS for generate log on Superlógica log format.

Getting started

To install the lib just run the command:

npm install @superlogica/super-log-js

Ready!

Now you can use the available interfaces and the adapter.

How it works?

The most basic possible use is to import default (adapter) and use it, as in the following example:

import { SuperLogAdapter } from '@superlogica/super-log-js';

const superLog = new SuperLogAdapter({
  channel: Channel.STDOUT,
  application: fakeApplication,
  environment: fakeEnvironment
})

superLog.critical({
  traceId: 'any-trace-id', 
  spanId: 'any-span-id', 
  message: 'any-message' 
})

// Or log with tags (max: 3)
superlog.info({
  traceId: 'any-trace-id',
  spanId: 'any-span-id',
  message: 'any-message',
  tags: { 
    tag1: 'any-tag-1', 
    tag2: 'any-tag-2', 
    tag3: 'any-tag-3' 
  } 
})

Readme

Keywords

Package Sidebar

Install

npm i @superlogica/super-log-js

Weekly Downloads

75

Version

2.1.2

License

ISC

Unpacked Size

94 kB

Total Files

118

Last publish

Collaborators

  • wilsinprado
  • diogorighisl
  • g-portugues
  • mdpbaptista10
  • murilosuperlogica
  • matheus.leal
  • luizsn000
  • nobrejonathan