2.1.2 • Published 3 months ago
@superlogica/super-log-js v2.1.2
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'
}
})