Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Simple NodeJS daemon to perform tail -f on one or more log files and stream them to a specific remote syslog server over TCP. Useful for instances where a program can not be conveniently rebuilt to use syslog.

Check out the announcement for more detail:


1. Check out the pipe-to-syslog project from Github and copy the configuration template
git clone /var/local/pipe-to-syslog
cd /var/local/pipe-to-syslog
2. Install all the dependencies.
npm install
3. Add it to Upstart.
cp pipe-to-syslog.conf /etc/init
4. By default we drop privileges and run as a user other than root, so create that user and group here.
useradd -M --shell /bin/false node
NOTE If you don't create this user and group, you will need to edit the /etc/init/pipe-to-syslog.conf file to remove the --user and --group parameters.

5. Create the local log file folder.
mkdir /var/log/node
NOTE If you don't create this folder the service will not start. If you want to log to a different location edit the /etc/init/pipe-to-syslog.conf file.

6. Setup the configuration file.
cp conf.js.template conf.js

Edit conf.js: we've tried to keep it pretty simple. You can have as many unique entries in the self object. For each entry, you can specify an arbitrary number of sinks, where each sink describes the source channel (in this case, a file that should be tailed) and the syslog level, facility and tag. For the entry you can specify the hostname to be sent to the syslog server (you'll need to make a note of this when you're configuring the syslog server), and then the actual syslog server IP address/DNS name and port number.

function get_config()
    var self = {};
    self['web'] = {
        sinks: [
                channel: { type: 'tail', file: '/var/log/node/out.log' },
                level: 'info',
                tag: 'web',
                facility: 'user',
                channel: { type: 'tail', file: '/var/log/node/err.log' },
                level: 'error',
                tag: 'web',
                facility: 'user',
        hostname: '{hostname}',
        server: '{syslog server IP address or DNS name}',
        port: {port number} };
    return self;

module.exports.get_config = get_config;
  1. And, you're done. Start it up.
service pipe-to-syslog start


NodeJS service to tail log files and relay the results to syslog.






No releases published


No packages published