rlo_08
/
1.0.1
rlo_08 1.0.1
Install from the command line:
Learn more about npm packages
$ npm install @teragrep/rlo_08@1.0.1
Install via package.json:
"@teragrep/rlo_08": "1.0.1"
About this version
Client Library written in Javascript to send messages to a Syslog server
let message = new SyslogMessage.Builder()
.withAppName('bulk-data-sorted')
//.withTimestamp(timestamp) // In case if the timestamp disabled, it will go with system timestamp.
.withHostname('iris.teragrep.com')
.withFacility(Facility.LOCAL0)
.withSeverity(Severity.INFORMATIONAL)
.withProcId('8740')
.withMsgId('ID47')
.withMsg('Todays lucky number is 17649276')
.withSDElement(new SDElement("exampleSDID@32473", new SDParam("iut", "3"), new SDParam("eventSource", "Application")))
.build()
npm install @teragrep/rlp_02
let relpConnection = new RelpConnection();
let host = '127.0.0.1';
let port = <<SET YOUR PORT#>>;
async.waterfall(
[
function init(setConnect) {
setConnect(null, port, host)
},
connect,
load,
commit,
disconnect
],
function (err) {
if(err) {
console.log(err);
}
else {
console.log('No Error')
}
}
)
async function connect() {
let conn = await relpConnection.connect(cfePort, host);
return conn;
}
async function disconnect(state) {
if(state){
await relpConnection.disconnect();
}
else {
console.log('Check the connection...')
}
}