🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@lidofinance/api-logger

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lidofinance/api-logger

API logger, which hides secrets

0.51.0
latest
Source
npm
Version published
Weekly downloads
12
-83.1%
Maintainers
0
Weekly downloads
 
Created
Source

@lidofinance/api-logger

API logger, which hides secrets

Installation

yarn add @lidofinance/api-logger

Getting started

You just need to initialize it with secrets you want to hide, usually it's all secrets from serverRuntimeConfig for next.js, after that, you are free to use it as regular console.log.

import getConfig from 'next/config';
import { serverLoggerFactory } from '@lidofinance/api-logger';

const { serverRuntimeConfig } = getConfig();
const {
  infuraApiKey,
  alchemyApiKey,
  subgraphMainnet,
  subgraphGoerli,
} = serverRuntimeConfig;

export const serverLogger = serverLoggerFactory([
  infuraApiKey,
  alchemyApiKey,
  subgraphMainnet,
  subgraphGoerli,
]);

serverLogger.log('Something common')
serverLogger.error(new Error('Some error'))

FAQs

Package last updated on 06 Mar 2025

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