Permalink
Browse files

another test message

  • Loading branch information...
1 parent 5df3764 commit 3f48710e0371ae55e57af43a48de190145ab4263 @portertech committed Aug 6, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 test/syslog_test.js
View
@@ -8,11 +8,14 @@ var options = require("nomnom").opts({
}
}).parseArgs()
-var message = new Buffer("<71>Nov 23 17:22:23 pirate_ship-127-0-0-1 all the piracy. none of the scurvy! all ye be walkin the plank if me timbers be shiverin. polly does not want a cracker but i will taketh one from ye.")
+var messages = []
+messages.push(new Buffer("<71>Nov 23 17:22:23 pirate_ship-127-0-0-1 all the piracy. none of the scurvy! all ye be walkin the plank if me timbers be shiverin. polly does not want a cracker but i will taketh one from ye."))
+messages.push(new Buffer("<56>Nov 23 17:22:24 red_stone-127-0-0-1 tired of constantly buying batteries for automatic doors and deathtraps."))
var syslog = dgram.createSocket("udp4")
var syslogPort = parseInt(process.env.TAILS_SYSLOG_PORT) || options.syslog
setInterval(function() {
+ message = messages[Math.floor(Math.random()*messages.length)]
syslog.send(message, 0, message.length, syslogPort, '127.0.0.1',
function (err, bytes) {
if (err) {

0 comments on commit 3f48710

Please sign in to comment.