<commit_before>/**
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corporation 2016. All Rights Reserved.
 *
 * Note to U.S. Government Users Restricted Rights:
 * Use, duplication or disclosure restricted by GSA ADP Schedule
 * Contract with IBM Corp.
 */
 'use strict';

var test = require('tape'),
    syslogd = require('syslogd'),
    log4js = require('log4js'),
    syslogAppender = require('../../');

test('Test message received by syslogd', function(t) {
    t.plan(1);
    var syslog = syslogd(function(info) {
    /*
    info = {
          facility: 7
        , severity: 22
        , tag: 'tag'
        , time: Mon Dec 15 2014 10:58:44 GMT-0800 (PST)
        , hostname: 'hostname'
        , address: '127.0.0.1'
        , family: 'IPv4'
        , port: null
        , size: 39
        , msg: 'info'
    }
    */
        console.log(JSON.stringify(info, null, 2));
        t.ok(info);
        t.end();

        syslog.server.close(function(err, msg) {
            if (err) {
                console.log('err: ' + err);
            }
            console.log('exiting test');
            process.exit(0);
        });
    }).listen(514, function(err) {
        log4js.loadAppender('qradar-syslog-appender', syslogAppender);
        log4js.addAppender(log4js.appenders['qradar-syslog-appender']({
            host: 'localhost',
            port: '514',
            useUdpSyslog: true
        }));
        var logger = log4js.getLogger('');
        logger.info('hai');
<commit_msg>Try to get test to pass in travis<commit_after>/**
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corporation 2016. All Rights Reserved.
 *
 * Note to U.S. Government Users Restricted Rights:
 * Use, duplication or disclosure restricted by GSA ADP Schedule
 * Contract with IBM Corp.
 */
 'use strict';

var test = require('tape'),
    syslogd = require('syslogd'),
    log4js = require('log4js'),
    syslogAppender = require('../../');

test('Test message received by syslogd', function(t) {
    t.plan(1);
    var syslog = syslogd(function(info) {
    /*
    info = {
          facility: 7
        , severity: 22
        , tag: 'tag'
        , time: Mon Dec 15 2014 10:58:44 GMT-0800 (PST)
        , hostname: 'hostname'
        , address: '127.0.0.1'
        , family: 'IPv4'
        , port: null
        , size: 39
        , msg: 'info'
    }
    */
        console.log(JSON.stringify(info, null, 2));
        t.ok(info, 'did the message get received?');
        t.end();

        // syslog.server.close(function(err, msg) {
        //     if (err) {
        //         console.log('err: ' + err);
        //     }
        //     console.log('exiting test');
        //     process.exit(0);
        // });
        process.exit(0);
    }).listen(514, function(err) {
        log4js.loadAppender('qradar-syslog-appender', syslogAppender);
        log4js.addAppender(log4js.appenders['qradar-syslog-appender']({
            host: 'localhost',
            port: '514',
            useUdpSyslog: true
        }));
        var logger = log4js.getLogger('');
        logger.info('hai');

{'fraction_non_alphanumeric': 0.14908034849951599, 'fraction_numerical': 0.030655050016134236, 'mean_word_length': 1.9580152671755726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7122849', 'n_tokens_mistral': 1052, 'n_tokens_neox': 982, 'n_words': 235}