Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@colucom/osseus-logger

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colucom/osseus-logger

Osseus logger

  • 0.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

JavaScript Style Guide

Osseus Logger

winston based osseus logger module

Install

$ npm install @colucom/osseus-logger

Usage

Configuration
  • OSSEUS_LOGGER_LOG_LEVEL
    • Mandatory. See Winston Logging Levels
    • Default log levels:
      • DEV environment - silly
      • QA environment - debug
      • PROD envrionment - info
  • OSSEUS_LOGGER_NO_CONSOLE_OVERRIDE
    • Optional. Set to true if you wish to disable console override

Note: console override

  • console.debug ==> logger.debug
  • console.log ==> logger.debug
  • console.info ==> no override! can be used to bypass logger functionality
  • console.warn ==> logger.warn
  • console.error ==> logger.error
Example

First, create index.js:

const Osseus = require('osseus')

const main = async () => {
	try {
		// init osseus
		const osseus = await Osseus.init()
		// option #1
		osseus.logger.debug(`hello logger`)
		// option #2
		console.log(`hello logger`)
  	} catch (err) {
		console.error(err)
  	}
}

main()

Running:

$ node index.js --OSSEUS_LOGGER_LOG_LEVEL 'debug'

Will result in:

2018-06-21T12:38:15.650Z - debug: (Liors-MacBook-Pro.local) (63287) - hello logger
2018-06-21T12:38:15.650Z - debug: (Liors-MacBook-Pro.local) (63287) - hello logger

Contributing

Please see contributing guidelines.

License

Code released under the MIT License.

FAQs

Package last updated on 28 Dec 2020

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