How to use the log4node.info function in log4node

To help you get started, we’ve selected a few log4node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bpaquet / node-logstash / lib / lib / monitor_file.js View on Github external
}
              else {
                logger.info('Have last read index, but file is too small.', 'Start reading', this.filename, 'at end fd', fd);
                this.fdTailer = new FdTailer(fd, stats.size, this.buffer_encoding, this.buffer_size, stats.isFIFO(), this);
                this.fdTailer.read();
                callback();
              }
            }
            // No data about file, starting normally
            else {
              if (start_index === undefined) {
                logger.info('Start reading', this.filename, 'at end', 'fd', fd);
                this.fdTailer = new FdTailer(fd, stats.size, this.buffer_encoding, this.buffer_size, stats.isFIFO(), this);
              }
              else {
                logger.info('Start reading', this.filename, 'at', start_index, 'fd', fd);
                this.fdTailer = new FdTailer(fd, start_index, this.buffer_encoding, this.buffer_size, stats.isFIFO(), this);
                this.fdTailer.read();
              }
              callback();
            }
          }.bind(this));
        }.bind(this));
github bpaquet / node-logstash / lib / lib / monitor_file.js View on Github external
this.fdTailer.read();
                  }
                  callback();
                }.bind(this));
              }
              else {
                logger.info('Have last read index, but file is too small.', 'Start reading', this.filename, 'at end fd', fd);
                this.fdTailer = new FdTailer(fd, stats.size, this.buffer_encoding, this.buffer_size, stats.isFIFO(), this);
                this.fdTailer.read();
                callback();
              }
            }
            // No data about file, starting normally
            else {
              if (start_index === undefined) {
                logger.info('Start reading', this.filename, 'at end', 'fd', fd);
                this.fdTailer = new FdTailer(fd, stats.size, this.buffer_encoding, this.buffer_size, stats.isFIFO(), this);
              }
              else {
                logger.info('Start reading', this.filename, 'at', start_index, 'fd', fd);
                this.fdTailer = new FdTailer(fd, start_index, this.buffer_encoding, this.buffer_size, stats.isFIFO(), this);
                this.fdTailer.read();
              }
              callback();
            }
          }.bind(this));
        }.bind(this));
github bpaquet / node-logstash / test / zmq_injector.js View on Github external
var events = require('events'),
  log = require('log4node'),
  zmq = require('zmq');

var target = process.argv[2];
var type = process.argv[3];
var period = process.argv[4];
var count = process.argv[5];
var max = process.argv[6];

if (!target || !type || !period || !count) {
  process.exit(1);
}

log.info('Target', target, 'period', period, 'count', count);

var k = 0;
var e = new events.EventEmitter();

e.on('msg', function() {
  k++;
  if (k % 10000 === 0) {
    log.info('Send', k);
  }
});

var kk = 0;

var socket = zmq.socket('push');
socket.connect(target);
github bpaquet / node-logstash / test / test_500_real_life.js View on Github external
child.on('exit', function(exitCode) {
    log.info('End of sub process', exitCode);
    callback(exitCode);
  });
}
github sipcapture / paStash / test / test_500_real_life.js View on Github external
child.on('exit', function(exitCode) {
    log.info('End of sub process', exitCode);
    callback(exitCode);
  });
}
github bpaquet / node-logstash / test / zmq_injector.js View on Github external
e.on('msg', function() {
  k++;
  if (k % 10000 === 0) {
    log.info('Send', k);
  }
});
github bpaquet / node-logstash / lib / filters / filter_regex.js View on Github external
FilterRegex.prototype.start = function(callback) {
  this.regex = new RegExp(this.regex, this.regex_flags);

  this.fields = this.fields.split(',');

  this.post_process = regex_helper.process.bind(this);

  logger.info('Initializing regex filter, regex : ' + this.regex + ', fields ' + this.fields + (this.date_format ? ', date format ' + this.date_format : '') + ', flags: ' + (this.regex_flags || ''));

  callback();
};
github bpaquet / node-logstash / lib / lib / directory_detector.js View on Github external
l.forEach(function(filename) {
          if (filter.filter(filename)) {
            logger.info('Subdirectory', filename, 'appears in', d);
            this.emit('exists', d + '/' + filename, true);
          }
        }.bind(this));
      }.bind(this));
github bpaquet / node-logstash / lib / outputs / abstract_udp.js View on Github external
AbstractUdp.prototype.startAbstract = function(callback) {
  logger.info('Start output to ' + this.to());

  this.socket = dgram.createSocket('udp4');

  callback();
};
github bpaquet / node-logstash / lib / filters / filter_compute_field.js View on Github external
FilterComputeField.prototype.start = function(callback) {
  logger.info('Initialized compute field filter on field: ' + this.field + ', value: ' + this.value);
  callback();
};

log4node

Logger for node cluster, compatible with logrotate

Unrecognized
Latest version published 10 years ago

Package Health Score

42 / 100
Full package analysis

Popular log4node functions