wx-pkg-api-logging

Logging module for nodejs APIs

Usage no npm install needed!

<script type="module">
  import wxPkgApiLogging from 'https://cdn.skypack.dev/wx-pkg-api-logging';
</script>

README

wx-pkg-api-logging

Summary

This package provides basic utilities to send your application logs Splunk.

How to use it

Config

see .example.env for configuration

Send logs

see src/lib/examples/example1.js for usages

Optional Configurations

Batching

src/lib/constants.js has the default configuration for optimal performance

batchInterval: 5000, maxBatchCount: 30

If you want to test without batching, please set it as follow via .env

"batchInterval":0,"maxBatchCount":1