This simple piece of code can give all the json array information from server but i want to write a function inside this and i want to return those values .
/**
* Created by sysadmin on 4/6/2017.
*/
var Syslogd = require('syslogd');
var fs = require('fs');
var str1='';
var str2='';
var str3='';
var str4='';
var row=0;
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(info);
}).listen(514, function(err) {
console.log('start'+err);
});
I want to write a function inside syslogd function and return some values.
via 1031210155 145046
No comments:
Post a Comment