bsd-log-js
v1.0.3
Published
elk log
Downloads
17
Readme
#How to get this Module
##NPM install :
npm i bsd-log-js
dep ensure -add gitlab.com/bad.bmp/bsd-log/elk
====================================================================================
#How to use ELK LOG
##Method : elkLog()
elkLog(log_level int, team_name string, logSuffix string, jsonData string, msg string)
Return error or nil(no error)
###LOG Level :
const LOG_LEVEL_INFO int = 0
const LOG_LEVEL_DEBUG int = 1
const LOG_LEVEL_WARN int = 2
const LOG_LEVEL_FATAL int = 3
#EXAMPLE /////////////////////////////////////
const log = require('bsd-log-js');
myObj = { "name":"John", "age":30, "car":null };
log.elkLog(log.elkLog.LOG_LEVEL_INFO,"bsd","monitor",myObj,"test")
/////////////////////////////////////////// #Output
{"name":"John","age":30,"car":null,"@suffix":"monitor","@team":"bsd","msg":"test","level":"info","message":"test"}