New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seal-log

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seal-log

Logger for all Node.js modules by SEAL Systems

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
46
decreased by-22.03%
Maintainers
1
Weekly downloads
 
Created
Source

seal-log

CircleCI Appveyor

seal-log is the logger for all Node.js modules by SEAL Systems.

All log messages will be written to stdout and can then be processed by 3rd-party tools.

Installation

$ npm install seal-log

Quick start

First you need to integrate seal-log into your application.

const log = require('seal-log').getLogger();

Logging

The following log levels are defined:

  • debug:

    log.debug('This is a debug message.');
    
  • info:

    log.info('This is a info message.');
    
  • warn:

    log.warn('This is a warning message.');
    
  • error:

    log.error('This is a error message.');
    
  • fatal:

    log.fatal('This is a fatal error message.');
    

    Please note: This level will be used for logging an unhandled exception.

Uncaught exceptions

Exceptions that are not caught otherwise are also logged with log level fatal. After logging the exception, the process will be terminated with exit code 1. You have to require the log module at least one time in your project to enable this feature. No further configuration is required.

Environment Variables

LOG_LEVELS

A list of log levels to print out. Possible levels are:

  • debug
  • info
  • warn
  • error
  • fatal

You have to provide a comma seperated list of the log levels you are interessted in:

LOG_LEVELS=info,warn,error,fatal

The list given above is the default setting, if no environment variable is set.

You can enable all logging levels with the shortcut

LOG_LEVELS=*

LOG_LEVEL

A single minimum log level which includes all higher levels.

LOG_LEVEL=warn

The setting above includes log levels warn, error and fatal.

The environment variable LOG_LEVEL has precedence over LOG_LEVELS.

Running the build

To build this module use roboter.

$ bot

FAQs

Package last updated on 17 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc