splunk / splunk-bunyan-logger

A Bunyan stream for Splunk's HTTP Event Collector
http://dev.splunk.com/
Apache License 2.0
19 stars 8 forks source link

Support for log levels #8

Closed yusufali2205 closed 6 years ago

yusufali2205 commented 6 years ago

Is it possible to add support for log levels during initialization? So that only logs of that level and above will be sent to HTTP Event Collector (HEC)?

Something like:

var config = {
    token: "your-token-here",
    url: "https://splunk.local:8088",
    level: "WARN"
};

So that

Logger.info(payload, "Chicken coup looks stable.");

will NOT be sent to the HEC

yusufali2205 commented 6 years ago

It looks like we can provide log levels during initialization.