Skip to content
Snippets Groups Projects
Select Git revision
  • f57ea35982cb5997218ef246794950f653f83842
  • main default protected
  • 3.1.7
  • 3.1.6
  • 3.1.5
  • 3.1.4
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 2.14.0
  • 2.13.5
  • 2.13.4
  • 2.13.3
  • 2.13.2
  • 2.13.0
  • 2.12.1
  • 2.12.0
  • 2.11.0
  • 2.10.1
  • 2.10.0
  • 2.9.1
22 results

log

log.js

A real simple logger application. May Optional Log to A File and / or a Graylog-Server

Installation

npm install --save git+ssh://tfs-br-prod.br-edv.brnet.int:22/ArGOS/lib/_git/log

Usage

const Log = require('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 folder-name will be used

Methods

  • log.info('This is an Information')
  • log.warn('This is a Warning')
  • log.error('This is an Error')
  • 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: [
    {
      server: 'graylog-server',
      port: 'graylog-port'
    }
  ]
}