Skip to content

Publishes CEE-Enhanced Logs to Rsyslog with some custom parameters for indexing and searching

License

Notifications You must be signed in to change notification settings

enobrev/rsyslog-cee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a fork of winston-rsyslog-cee, but it sends directly to syslog instead of using winston.

Install

npm install rsyslog-cee

yarn add rsyslog-cee

Options

    // import {Logger} from 'rsyslog-cee'; OR
    const Logger = require('rsyslog-cee').Logger;

    const oLogger = new Logger(
        {
            service: 'Whatever', // The App Name for Syslog
            console: true,       // Output logs to console
            syslog:  true        // Output logs to syslog
        }
    );

    const oTimer = oLogger.startTimer('Test');

    setTimeout(function() {
        oLogger.dt(oTimer);
        oLogger.removeSyslog();
    }, 1000);

    oLogger.d('Debug', {test: 'Debugging'});
    oLogger.w('Warn', {test: 'Warning'});
    oLogger.i('Info', {test: 'Information'});
    oLogger.n('Notice', {test: 'Notification'});
    oLogger.e('Error', {test: 'Error!'});
    oLogger.c('Critical', {test: 'Critical!'});
    oLogger.a('Alert', {test: 'Hey!'});
    oLogger.em('Emergency', {test: 'OMGWTF!!'});

About

Publishes CEE-Enhanced Logs to Rsyslog with some custom parameters for indexing and searching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published