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

glogg

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glogg

Global logging utility

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2M
increased by28.07%
Maintainers
2
Weekly downloads
 
Created

What is glogg?

The glogg npm package is a logging utility designed to enable global logging. It allows developers to create a global logger that can be required and used across different modules in a Node.js application. This makes it easier to manage and configure logging in a centralized manner, especially in large-scale applications where consistent logging practices are crucial.

What are glogg's main functionalities?

Creating a global logger

This feature allows you to create a global logger instance that can be used throughout your application. You can name your logger (in this case, 'my-logger') and use various methods such as 'info', 'warn', 'error', etc., to log messages.

const logger = require('glogg')('my-logger');
logger.info('This is an info message');

Listening to log events

This feature enables you to listen to log events. You can attach event listeners to your logger for different log levels (e.g., 'info', 'warn', 'error') and define custom actions, such as logging to a file or sending notifications, when these events occur.

const logger = require('glogg')('my-logger');
logger.on('info', (msg) => {
  console.log(`Info: ${msg}`);
});
logger.info('This is an info message');

Other packages similar to glogg

Keywords

FAQs

Package last updated on 23 Mar 2024

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