Splunk Cloud Platform

level config is not working on SplunkLogger splunk-logging JS package

PacoPeralta
New Member

Hello Splunk team!
I'm having an issue setting the level parameter on the configuration object for SplunkLogger constructor on splunk-logging JS package version "^0.10.1".
This is my code:

const config = {
token: `${process.env.SPLUNK_TOKEN}`,
url: `${process.env.SPLUNK_HOST}`,
level: "error"
};

const splunkLogger = new SplunkLogger(config);

It doesn’t matter which level I set, it always sending all the logs severities. 

Could you please help me on this?

Thanks in advance!

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...