index.js
function (options) {
    winston.Transport.call(this, options);

    options = options || {};

    var apiKey = options.apiKey;
    var projectId = options.projectId;
    var apiHostName = options.apiHostName;
    var formatter = options.formatter || 'kvp';

    if (!apiKey || !projectId || !apiHostName) {
        throw new Error('apiKey, projectId and apiHostName are neccessary');
    }

    this._storm = new SplunkStorm({
        apiKey: apiKey,
        projectId: projectId,
        apiHostName: apiHostName,
        formatter: formatter
    });
    this._sourceType = options.sourceType || 'syslog';
    this._source = options.source || '';
    this._host = options.host || os.hostname();

    this._options = options;
}
function (options) {
    winston.Transport.call(this, options);

    options = options || {};

    var apiKey = options.apiKey;
    var projectId = options.projectId;
    var apiHostName = options.apiHostName;
    var formatter = options.formatter || 'kvp';

    if (!apiKey || !projectId || !apiHostName) {
        throw new Error('apiKey, projectId and apiHostName are neccessary');
    }

    this._storm = new SplunkStorm({
        apiKey: apiKey,
        projectId: projectId,
        apiHostName: apiHostName,
        formatter: formatter
    });
    this._sourceType = options.sourceType || 'syslog';
    this._source = options.source || '';
    this._host = options.host || os.hostname();

    this._options = options;
}
function ( options ) { winston . Transport . call ( this , options ) ; options = options || { } ; var apiKey = options . apiKey ; var projectId = options . projectId ; var apiHostName = options . apiHostName ; var formatter = options . formatter || 'kvp' ; if ( ! apiKey || ! projectId || ! apiHostName ) { throw new Error ( 'apiKey, projectId and apiHostName are neccessary' ) ; } this . _storm = new SplunkStorm ( { apiKey : apiKey , projectId : projectId , apiHostName : apiHostName , formatter : formatter } ) ; this . _sourceType = options . sourceType || 'syslog' ; this . _source = options . source || '' ; this . _host = options . host || os . hostname ( ) ; this . _options = options ; }
Constructor function for the Splunkstorm constructor
@param options
@constructor
Constructor function for the Splunkstorm constructor