Log tracking module with node

npm install oranch
4 downloads in the last week
16 downloads in the last month

oranch Build Status

Log file tracker using in node. Installing and using easily as npm module. npm

Get starting


$ npm install oranch


Create oranch object

To create oranch object, you should give some options as below. Default is cron scheduling.

  • schedule : Oranch read logfile at fixed interval decided by this parameter. Written in crontab format.
  • logfile : Oranch read this file.
  • task : When log matching is induced, this task will be called.
  • match : Log matching is conditioned by this regular expression.
  • onComplete : When oranch stops, this function will be called.

If your tracking is unfrequent, you should use watchFile API in node. watchFile API calls your task funcion in the case of updating logfile. So it will be more efficient unfrequent case.

  • jobType : If you want to use watchFile API, please set watch. Default is cron.

In order to start tracking log, please call start.


When you want to stop oranch log tracking, call stop.



var Oranch = require('oranch').Oranch;
var options = {
    'schedule' : '* * * * * *',
    'logfile'  : '/path/to/somelogfile.log',
    'match'    : /WARN/,
    'task'     : function () {  
        // Write down what you want when WARN log is induced.
    'onComplete' : function () {
        // Write down what you want when Oranch stops

var oranch = new Oranch(options);


MIT License

npm loves you