sigmundd-log
TypeScript icon, indicating that this package has built-in type declarations

2.10.1 • Public • Published

log

A real simple logger application. May Optional Log to A File and a graylog-server via http or udp.

Installation

  • npm install --save sigmundd-config

Usage

const Log = require('sigmundd-log')
let log = new Log(options)

Note: The options Part may be omitted, as all parts are optional, but using the name is recommended, as without it, the package-name will be used

Methods

  • log.info('This is an Information' )
  • log.notice('This is a Notice' )
  • log.warn('This is a Warning' )
  • log.error('This is an Error' )
  • log.fatal('This is a Fatal Message' )
  • log.debug('This is a Debug Message' )

Options

{
  name: 'Name of App. Default: Name of BaseFolder',
  hostname: 'Server Hostname, Default: os.hostname()',
  file: 'File to Append Log to',
  graylog: {
    active: 'true or false',
    mode: 'http or udp, defaults to udp',
    server: 'graylog-server',  
    port: 'graylog-port'
  },
  path: 'Path Logfile located',
  loglevel: 'Minimal LogLevel. Default: WARN'
}

/sigmundd-log/

    Package Sidebar

    Install

    npm i sigmundd-log

    Weekly Downloads

    0

    Version

    2.10.1

    License

    ISC

    Unpacked Size

    19.4 kB

    Total Files

    12

    Last publish

    Collaborators

    • sigmundd