@ac-moore-inc/splunk-logger 中文文档教程
Splunk Logger
一个易于使用的 splunk 日志实用程序。
由 AC Moore 软件工程团队创建和维护。
To Use:
var splunkLogger = require('@ac-moore-inc/splunk-logger');
splunkLogger.init(config);
splunkLogger.log(eventObject, callback);
Config Object Syntax
{
splunkUrl: 'http://urlToSplunk',
splunkToken: 'splunk-token',
}
EventObject Syntax
{
source: string,
eventMsg: string,
eventSev: string,
errMsg: string,
eventData: string
}
source:
记录事件的来源
eventMsg:
触发记录事件的字符串描述 记录事件的
eventSev:
严重级别 与记录事件
errMsg:
关联的任何错误消息
eventData:
包含有关记录事件的附加信息的 JSON 对象
Splunk Logger
An easy to use splunk logging utility.
Created and maintained by the A.C. Moore software engineering team.
To Use:
var splunkLogger = require('@ac-moore-inc/splunk-logger');
splunkLogger.init(config);
splunkLogger.log(eventObject, callback);
Config Object Syntax
{
splunkUrl: 'http://urlToSplunk',
splunkToken: 'splunk-token',
}
EventObject Syntax
{
source: string,
eventMsg: string,
eventSev: string,
errMsg: string,
eventData: string
}
source:
The source the event is being logged from
eventMsg:
String description of what triggered the event being logged
eventSev:
Severity level of the event being logged
errMsg:
Any error message associated with the event being logged
eventData:
A JSON object containing additional information about the event being logged