Skip to content

Instantly share code, notes, and snippets.

Created March 1, 2011 23:23
Show Gist options
  • Save anonymous/850114 to your computer and use it in GitHub Desktop.
Save anonymous/850114 to your computer and use it in GitHub Desktop.
My main application script, showing how I use the log wrapper/abstraction
// Require necessary modules
var sys = require('sys');
var path = require('path');
var http = require('http');
var io = require('socket.io');
var dgram = require('dgram');
var log = require('./lib/log');
// Define variables
var logger = log.getLogger('data_agent');
// Logs the server startup
function logDataServerStartup(dataPort) {
logger.info('Server running at http://127.0.0.1:' + dataPort + '/');
}
logDataServerStartup(8080);
// etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment