var exec = require('child_process').exec; callbacks for commands that run continuously

I am trying to write an interface for the adb logcat command with node.js, and need some help having my function do continuous and asynchronous callbacks. This command generates constant output that I want to send to the callback function as it is generated (not after I let it run for awhile and then stop it). Is this possible with node.js, and if so how do I do it?

Here is my code so far

exports.logcat = function(options, callback){
    var logcatCmd = "adb logcat" + options;
    console.log("sending command: " + logcatCmd);
    exec(logcatCmd, function(error, stdout, stderr){
        if(error !== null){
            console.log("encountered error = " + error);
        }
        callback(stdout);
    });
};

In short, no; you cannot watch shell commands for new outputs, in the same way you can stream data from a changing file or socket.

If it generates constant output, it's more likely it just reads from some log file and prints it on screen. You should figure out which file it's getting the data from, and use fs.watch with readableStream to continuously get the stream of data.