
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
gutter-logger
Advanced tools
Gutter is a versatile logging module for TypeScript projects that allows you to log data to a remote log drain API while seamlessly integrating with the console. It provides a flexible way to centralize and manage logging in your applications.
You can install Gutter using either npm or Yarn:
npm install gutter-logger
yarn add gutter-logger
1. Import Gutter and Polyfill: Import the Gutter
class and useGutterPolyfill
function in your TypeScript project.
import Gutter, { useGutterPolyfill } from 'gutter-logger';
2. Replace Console with Gutter (Optional): You can choose to replace the default console
with Gutter for seamless integration.
useGutterPolyfill(apiUrl, appKey, enableConsoleLogging, debugMode);
By calling useGutterPolyfill
, you replace the default console
with a custom console that uses the Gutter logger as its underlying mechanism.
3. Logging: You can now use the modified console
to log data to the remote API and/or the console.
console.log('This is a log message');
console.error('This is an error message');
console.warn('This is a warning message');
// Use other console methods as well, e.g., console.info, console.debug, etc.
1. Import Gutter: Import the Gutter
class in your TypeScript project.
import Gutter from 'gutter-logger';
2. Create a Gutter Instance: Create an instance of the Gutter
class, providing the API URL and optional configuration options.
const apiUrl = 'https://your-logdrain-api-endpoint.com';
const gutter = new Gutter(apiUrl, appKey, enableConsoleLogging, debugMode);
apiUrl
: The URL of your log drain API.appKey
(optional): An application key to identify the source of logs (useful for multiple projects).enableConsoleLogging
(optional): Enable or disable console logging (default: true
).debugMode
(optional): Enable debug mode to log errors and debug information (default: false
).3. Logging: You can now use the Gutter instance to log data to the remote API and/or the console.
gutter.log('This is a log message');
gutter.error('This is an error message');
gutter.warn('This is a warning message');
// Use other console methods as well, e.g., gutter.info, gutter.debug, etc.
Check the examples directory for usage examples and integration with popular frameworks and libraries.
You can configure the Gutter instance when creating it, allowing you to customize its behavior according to your project's needs.
apiUrl
: The URL of your log drain API.appKey
(optional): An application key to identify the source of logs (useful for multiple projects).enableConsoleLogging
(optional): Enable or disable console logging (default: true
).debugMode
(optional): Enable debug mode to log errors and debug information (default: false
).This project is licensed under the MIT License - see the LICENSE.md file for details.
FAQs
A versatile logging module for TypeScript projects.
The npm package gutter-logger receives a total of 0 weekly downloads. As such, gutter-logger popularity was classified as not popular.
We found that gutter-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.