2
* run this, then "ab -c 10 -n 100 localhost:4444/" to test (in
5
var log4js = require('./lib/log4js');
8
{ type: 'file', filename: 'cheese.log', category: 'cheese' },
13
var logger = log4js.getLogger('cheese');
14
logger.setLevel('INFO');
16
var http=require('http');
18
var server = http.createServer(function(request, response){
19
response.writeHead(200, {'Content-Type': 'text/plain'});
20
var rd = Math.random() * 50;
21
logger.info("hello " + rd);
22
response.write('hello ');
23
if (Math.floor(rd) == 30){
24
log4js.shutdown(function() { process.exit(1); });