@baljeetkode/watcher
v1.0.1
Published
Define your schema in: `\utils\elasticsearch\config.js`
Downloads
9
Readme
Defination
Define your schema in: \utils\elasticsearch\config.js
Configuration
Set these env variable
B_WATCHER_URL = https://localhost:9200 // elasticsearch URL
B_WATCHER_USERNAME = elastic // elasticsearch username
B_WATCHER_PASSWORD = ****** // elasticsearch password
B_WATCHER_CA = ****** // elasticsearch CA_CERT
B_WATCHER_CLIENT_ID = MY_CLIENT // service client-id
Usage
import Watcher from '@baljeetkode/watcher';
// logs
Watcher.log({
data: "A long text to search for",
key1: '[email protected]',
key2: 'logger Function @ 3 $ one',
})
// errors
Watcher.error({
data: "Your text here",
key1: '[email protected]',
key2: 'logger Function @ 3 $ one',
})