elastic-logger
v1.0.3
Published
This package gives the Elastic Error logs and API logs.
Downloads
258
Readme
The package helps in keeping a track of Error Logs, API Access logs and Outgoing Api logs.
All the functions are imported as: const { function_name } = require('elastic-logger'); Following is the description of the functions and their use cases:
exportAccessLogs : It creates the logs of the access APIS. It's called as follows - exportAccessLogs(elasticUrl, microServiceName, brand_name, cs_env, batchSize)
overwriteHttpProtocol : It creates the logs of the APIS called from our code. It's called as follows - overwriteHttpProtocol(elasticUrl, microServiceName, brand_name, cs_env, batchSize)
createErrorLogInElastic : It creates the logs of the errors in the code. It's called as follows - createErrorLogInElastic(err, elasticUrl, microServiceName, brand_name, cs_env, batchSize)
Note: --> err is the description of the error to create a log of. --> elasticUrl is the elastic server url. --> microServiceName is the Repository name. --> brand_name is the Repository brand name. --> cs_env is the Repository environment. --> batchSize is the array size to create logs.