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

ts-mongodb-logger

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-mongodb-logger

MongoDB log channel for ts-composite-logger

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

MongoDB log channel for composite logger

Use this package in your applications for logging to MongoDB. You can learn more about composite logger here.

npm install -S ts-mongodb-logger

Usage

import {Logger} from "ts-composite-logger";
import {MongoDB} from "ts-mongodb-logger";
  
const mongo = new MongoDB(
    "mongodb://serkyron:password@localhost:27017/?authMechanism=SCRAM-SHA-1&authSource=dbname",
    "dbname",
    "log",
);

mongo.connect()
  .catch((e) => {console.error(e.message)});

global.logger = (new Logger())
  .addChannel(mongo);
	
global.logger.info("VM connected");

Keywords

FAQs

Package last updated on 07 Jul 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